Mobile app version of vmapp.org
Login or Join
Gail5422790

: Structured data. Img. Width With structured data and img width and height, Google says "number required". Does it mean that Google only accepts the numbers in pixels? https://developers.google.com/search/docs/data-types/articles

@Gail5422790

Posted in: #Images #ResponsiveWebdesign #RichSnippets #SchemaOrg #StructuredData

With structured data and img width and height, Google says "number required". Does it mean that Google only accepts the numbers in pixels? developers.google.com/search/docs/data-types/articles

<div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
<img src="https://google.com/thumbnail1.jpg"/>
<meta itemprop="url" content="https://google.com/thumbnail1.jpg">
<meta itemprop="width" content="800">
<meta itemprop="height" content="800">
</div>


But nowadays almost all img need to be responsive. So the img CSS is:

img {
width: 100%;
height: auto;
}


and the structured data:

<meta itemprop="width" content="100%">
<meta itemprop="height" content="auto">


In structured data, the values of the width and height, how should it be? Can I use 100% and auto?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Gail5422790

1 Comments

Sorted by latest first Latest Oldest Best

 

@Shanna517

Schema.org’s height/width properties are not for stating in which dimension the image should be displayed, but which dimension the image file has.

Knowing the image’s height/width, consumers (like Google Search) can then decide if to do something (and what to do) with the image. They will use their own CSS if they display the image.

In the case of Google Search, they want to see pixel values, e.g., for their Article rich result:


The height of the image, in pixels.





The width of the image, in pixels.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme