I run an online store and to improve performance, the images are hosted on a different domain. However, when I switch to secure mode using SSL on certain parts of the website, the background images disappear. Trying to view the image directly in the browser prompts me to accept a security certificate before displaying it.
My CSS code looks like this:
.some_class {
background: url('//another_domain.com/image.png') no-repeat;
}
Is there a way to show background images from a different domain when SSL is enabled?
If I try using https in the URL like this:
.some_class {
background: url('https://another_domain.com/image.png') no-repeat;
}
then the images are not visible on non-secure pages.
Using http:// will compromise the security of the page.