Provided og:image is not big enough in Facebook linter

我的梦境 提交于 2019-12-03 10:52:29

This was happening to me. I was only using the meta og:image tag. I added the following in the head

<link rel="image_src" type="image/jpeg" href="img_path" />

and it fixed the problem for me.

Jeremy Schultz

The thread here is pretty helpful: og:image Open Graph Warnings image size

Generally, FB's parser prefers images that are (1) measured in multiples of 100 and (2) square format.

Try re-saving the image in a different image editor. Sometimes the image metadata can indicate that the image is a different size than it actually is. Re-saving it with a different program (in my case, I used MS Paint) can make the metadata more facebook-friendly.

I have experienced same error with my custom Web server ServeRick, the solution unexpectedly was to send Content-Length header with images.. without this header facebook didn't accept any of my og:image links

I was having a space in my image path of my image.

Like my image path was http://example.com/jodha akbar/image.jpg

If you observe above. The jodha akbar directory is having space.

And Facebook was not picking up the path due this special character may be.

I added a PHP str_replace function. And it worked for me.

str_replace(" ","%20",$image_path)

Converting the same image from JPG to PNG did the work for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!