Nik Nik - 1 month ago 20
HTTP Question

Convert image source to https

I am working on a site that is fully under https.
The issue is that one of the pages calls an image that is not secure so I am having mixed content on that specific page.
How can I change this call to have it secured?

<img src="<%=carImage%>" width="430" height="220" align="right" border="0">


Do I have to go to the source and change the actual
carImage
class, or can I just change it from here?

Answer

I'm assuming carImage returns a protocol inclusive URL such as http://domain.com/something.ext. You'd need to change this to return an HTTPS URL.

If the image is on the same domain as the page you're viewing it on, consider making these image src values relative (i.e., remove http://domain.com or https://domain.com from the value returned by carImage)

Comments