Why isn't Facebook recognizing my images?

Aug 26, 2014 12:52 pm

Recently we had an issue where a solution provider reported that a site's blog's featured image were not being recognized when posted to Facebook. The reason ultimately was that the image was named like "image name.jpg". Facebook does not handle spaces in image names well, so the recommended naming convention for images which you want to show up when users post your blog would be like "imagename.jpg".

To test out whether your particular page is going to work when someone posts it to Facebook, you can use this tool: https://developers.facebook.com/tools/debug/og/object/.

This tool is the Facebook linter/debugger. It both helps you see what the facebook scraper sees for troubleshooting and clears Facebook's scraper cache (the scraper caches urls so it doesn't scrape every time someone posts the same link). Look at the section with the header "When shared, this is what will be included". This is the preview for when someone posts the url to a wall. If your image does not have any spaces it should appear here next to the text.

To refresh the Facebook cache, you can click 'Fetch new scrape information'. Ironically, the debugger is a little buggy and you may have to click on the button several times to see any changes that you have made. After a little clicking, scroll down to the preview section - you will see the image with the preview, same as you will when you go to paste the image into the actual Facebook wall post.

Oct 1, 2014 1:10 pm

If you have images referenced from a subdrectory, then that folder name must also NOT have spaces or the image will not appear on facebook.

Example:
/clientuploads/blog_images/imagename.jpg

Leaving a space in "blog images" folder will cause the image not to appear in Facebook.

You may have to review your sites naming conventions for folders with spaces in the path, that contain images that would be tagged to post to Facebook.

I guess the best practice would be to never create folders with spaces in the names. Instead use underscores for spaces or camelBack naming convention.

Oct 6, 2014 10:05 am

Originally Posted by pberg
You may have to review your sites naming conventions for folders with spaces in the path, that contain images that would be tagged to post to Facebook.
I guess the best practice would be to never create folders with spaces in the names. Instead use underscores for spaces or camelBack naming convention.

Great tip as well Paul, thank you.

Oct 6, 2014 10:05 am

Good point about the folder names pberg,

I try to keep spaces out of anything that could have a web URL. Other social networks may start getting picky with spaces as well.