Facebook share button - specific image issue

68 Views Asked by At

I have a php page which from a $_GET receives the image to be displayed. A simple id which is placed in an echo.

I want people to be able to share this particular image. I have placed in the header a META tag which also uses $_GET to fill the content for og:image. When I inspect the page I can clearly see the correct data.

When I load the url in the Facebook debugger it uses the URL without the added data behind the '?'. Also using the share button results in seeing an empty image.

How can I make sure people will see the correct image when sharing?

Some other information : The site has a big banner above the custom image. When I don't use og:image it just takes this big banner as the displayed image which I don't want.

1

There are 1 best solutions below

0
On

For anyone who has a similar problem : I have found that the issue was with my jpg's. Not sure what went wrong but I re-saved them and it all works!

I use ImageOptim and Save for Web in Photoshop to reduce filesize so the problem may lie there.