Search code examples
javascriptmeta-tagswebpfacebook-debugger

Can we use webp extension image in og:image meta tag?


In my website i have converted all the image from jpg or png to webp but after this my og:image meta tag is unable to fetch images. In facebook debugger i see the following error

The provided 'og:image' properties are not yet available because new images are processed asynchronously. To ensure shares of new URLs include an image, specify the dimensions using 'og:image:width' and 'og:image:height' tags.

After a little search i found that this error appears for the first time during page fetch when sometimes facebook is not able to fetch image dimensions at first time but in my case this error is constant for all the time. Is it because facebook might not able to fetch image details as i have used webp extension.


Solution

  • https://developers.facebook.com/docs/sharing/webmasters/#images says,

    og:image:type - MIME type of the image. One of image/jpeg, image/gif or image/png

    Now og:image:type does not need to be explicitly specified; but since the restriction to those MIME / file types is mentioned for that property, that should also mean you can not use WebP for og:image.