Images showing in Admin, but not Blog

I’ve got some older post that I haven’t looked at in awhile, so I don’t know exactly when this stopped working. The images in the post show up fine in the admin interface, but don’t show in either the high level, or the detail post view, in the blog itself. The images are hosted on an external site. Looking in the browser logs the problem “may be” that the reference to the external images are http and not https. For the life of me, I can’t figure out via the Admin interface how to change that, the images show, but I don’t know how to edit the image URL.

Yep, mixed https and http is a major culprit for images not loading.

If you’re handy, you could write a script that grabs the posts (as html), rewrites those http to https, and then updates them on the server. There’s a actually a command-line find and replace tool: GitHub - TryGhost/gctools: Command line utilities for working with Ghost content
(Be careful. Make a backup. It’s possible to utterly destroy your site with this tool.)

An easier option might be to add a little javascript that checks for http image links going to the domain and rewrites them as https. Drop that in code injection, and you should be good.

Thank you. To confirm that is the issue, I manually updated the posts table for one, changing http to https on the featured_image field. That did the trick.

1 Like