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

2

23

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.

Kinch answered 16/9, 2019 at 11:12 Comment(0)
C
25

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.

Catercorner answered 16/9, 2019 at 11:18 Comment(5)
It looks like that, yes.Catercorner
upvoted your efforts for searching and answering....but i still want to assure that its documented that webp is not supported. If that is the case i will accept the answer.Kinch
This is outdated. Facebook uses a webp from the og:image meta tag just fine.Entelechy
This type restriction is not mentioned in the Open Graph protocol here: ogp.meIncite
@Entelechy i'm seeing png.Drew
C
11

Twitter and Facebook now supports WebP in og:meta.

It is not in the OpenGraph specifications - but only in the Twitter version of it twitter:image. Since Facebook uses og:image, there is probably no support for WebP yet.

Hi, a comment without a source is not helping the community. – djibe Mar 22 at 9:26

twitter:image

A URL to a unique image representing the content of the page. You should not use a generic image such as your website logo, author photo, or other image that spans multiple pages. Images for this Card support an aspect ratio of 2:1 with minimum dimensions of 300x157 or maximum of 4096x4096 pixels. Images must be less than 5MB in size. JPG, PNG, WEBP and GIF formats are supported. Only the first frame of an animated GIF will be used. SVG is not supported.

https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/summary-card-with-large-image

Camper answered 27/5, 2021 at 8:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.