1

I got this error:

The page at 'https://www.google.com/' was loaded over HTTPS, but requested an insecure image 'http://i.imgur.com/#####.png'. This content should also be served over HTTPS.

How can I fix this?
My Stylish code:

#hplogo {
    /* these numbers match the new image's dimensions */
    padding-left: 125px !important;
    padding-top: 25px !important;
    background: url(http://i.imgur.com/cr5pCeF.png) no-repeat !important;
}
Brock Adams
  • 90,639
  • 22
  • 233
  • 295

1 Answers1

0

The browser won't complain if you request a "secure" (https) image from an an unsecured (http) page1.

So just use background: url(https://i.imgur.com/cr5pCeF.png) no-repeat !important;

1 In your case, Google auto-redirects from http to https anyway, so there won't be a mismatch.


Additionally, for Stylish on Chrome, you can use the auto-protocol form of the URL. That is:

background: url(//i.imgur.com/cr5pCeF.png) no-repeat !important;

But, unfortunately, this is not yet supported in Firefox. So don't use that in cross-browser Stylish scripts.

Brock Adams
  • 90,639
  • 22
  • 233
  • 295
  • Thank you! Also, can I DELETE images with stylish? (It has to be with tag) – BatchProgrammer Feb 25 '16 at 21:09
  • Since this seems to have answered your question, please [tick the benchmark for this answer](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work/5235#5235). .. And, no you cannot delete an image with Stylish, but you can set `display: none !important;`. – Brock Adams Feb 25 '16 at 21:16