Forum Moderators: phranque

Message Too Old, No Replies

SSL breaks images on my site

         

timchuma

9:59 am on Jan 4, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



I have gallery3 and zenphoto but it also breaks all images on my website every time I try to implement it. A lot of my site is coded in raw HTML so it would be too difficult to change all the links.

Is there something I am missing?

robzilla

11:01 am on Jan 4, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If the http:// protocol is hard-coded into your HTML, you have no choice but to change all those URLs to HTTPS or, preferably, a relative path: /img/logo.jpg instead of https://www.example.com/img/logo.jpg. A webpage served from HTTPS cannot load any resources from insecure URLs (plain HTTP), as most browsers will block these requests. See, for example: [blog.chromium.org...]

engine

11:37 am on Jan 4, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



A lot of my site is coded in raw HTML so it would be too difficult to change all the links.


I'm not sure what program you use to create your site, but a text editor can help. It has a find, or find an replace which might help, depending upon your confidence.

tangor

2:47 am on Jan 5, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Text editors with site global are quite handy ... just be sure your targets are specific else all kinds of havoc can ensue! Been there, done that. Don't want to do it again!

timchuma

8:20 am on Jan 5, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



All of the images are relative links but it still breaks all of them. The photo galleries are auto-generated hard-coded HTML with manually placed Google analytics code. It was a pain to do originally and hard to maintain.

phranque

8:44 am on Jan 5, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



it still breaks all of them

please describe "breaks" in technical terms.

robzilla

9:21 am on Jan 5, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



What happens if you manually open the URL of one of these images?

To investigate, open the Developer Tools in your browser (usually F12 or Ctrl + Shift + i), go to the Network tab, then reload your page. Are the image requests returned with an error? The Console may also give you some hints as to why they're not loading.

JorgeV

10:36 pm on Jan 5, 2021 (gmt 0)

WebmasterWorld Senior Member 5+ Year Member Top Contributors Of The Month



please describe "breaks" in technical terms.

That.

I guess the images are showing the "broken" icon, (image missing).

My guess is that, the secured version of the site, is in a different folder than the non secure one.

phranque

11:54 pm on Jan 5, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



in technical terms

- what url is being requested by the browser? (try left click / view image)
- what happens when you directly request that url?
- what status code is the response?
- are there any useful clues in the web server access and error log files?

lucy24

2:29 am on Jan 6, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My guess is that, the secured version of the site, is in a different folder than the non secure one.
This should be easy to check by opening View Source (name depends on browser) and seeing exactly what is in the <img src> tags.

Any self-respecting text editor should be able to do global replaces across multiple hard-coded files. Practice on a backup, because it is scary at first.

timchuma

6:12 am on Jan 12, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



I did used to hand-code all my web galleries. I would rather pull my own teeth out than have to do a global search and replace on all my web galleries so also the old Google Adsense code stays.

engine

9:48 am on Jan 12, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Sounds like a rock and a hard place from what you've described.

It's probably worth checking that the software isn't making calls home with an embedded tracking gif, and it's not your own images causing the issue.

robzilla

10:21 am on Jan 12, 2021 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You probably won't need to edit the URLs if they were already relative and the only change was from HTTP to HTTPS. Many good troubleshooting ideas and questions have been posted here, but if you don't respond to them there's nothing further that we can do to help you with this.

phranque

10:50 am on Jan 12, 2021 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



what robzilla said.

this is the sum total of your description of the problem:
it also breaks all images on my website

it still breaks all of them