random_username's picture

I'm working under Settings > General > Site Meta Settings > Facebook card. I upload our Facebook image but it doesn't appear in the preview or in the upload section correctly. Acts as though the image link is broken. Any ideas what's going on here? Does uploaded images not have proper permissions inside Ghost or something?

As a side-note, using images from Unsplash appear just fine in this section. I'm at a loss as to what's going on here.

Forum: 
Jeremy Davis's picture

That's a strange issue?!

At first glance, my guess was permissions (which it may well be). But then you said other images (which I assume were uploaded in a similar fashion) were displaying fine?!

As per our recent discussion on updating Ghost, all the folder permissions should be right. And if it was uploaded via the Ghost UI, it certainly shouldn't be a permissions issue (if Ghost could save the file, surely it should be able to read it again later?!).

So possibly the first thing to check is what error the image is giving. You note that it appears that image link is broken, so chances are that will be causing a specific HTTP error code which will assist with troubleshooting. So if you can right click the image (or where it should be) and "open in new tab" (if it allows that). Then in the new tab, you should get a clear error message. My guess is 401, 403 or 404, but it might also be a 50x error.

If you can't do that for whatever reason, then another way to get the same info is via teh web browser "developer tools". These days, all browsers should have the option to show a developer console. E.g. for Firefox it's "Tools > Web Developer > Web Developer Tools"; for Chrome it's "Chrome Menu (in the upper-right-hand corner of the window) > More Tools > Developer Tools). With the dev tools open, you should be able to view errors and the error(s) related to your images should show there (plus likely a ton of other warnings that you can safely ignore).

Apparently Ghost's internal logs aren't that helpful (or so I've read), but the Nginx logs might also give some value? They should be found /var/log/nginx/error.log.

I hope that helps. If not, please let me know (plus any relevant info you've dug up in the meantime).

random_username's picture

So thanks to your suggestions I think I figured out my issue. I'm using ghost internally on my localhost and during my install it required a domain name to which I added (though don't use currently) - so images were uploading fine, but the link to them was to my domain name and not the localhost. Thank you for all your help!

Jeremy Davis's picture

Ah ha! The good old hosted on a domain that doesn't exist trick... :)

FWIW, for future reference, if you access it via IP address, you can set the domain to the IPv4 address.

Add new comment