Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Attribute sizes may not appear in tag 'img' #121

Open
Lofesa opened this issue Aug 2, 2019 · 3 comments
Open

Attribute sizes may not appear in tag 'img' #121

Lofesa opened this issue Aug 2, 2019 · 3 comments

Comments

@Lofesa
Copy link

Lofesa commented Aug 2, 2019

Hi
In https://ampbench.appspot.com/validate?url I´m getting this message when validating a url:
The attribute 'sizes' may not appear in tag 'img'. (see https://www.ampproject.org/docs/reference/components/amp-img)
But in the reference page it says:

sizes

The value of the AMP sizes attribute is a sizes expression that selects the defined size corresponding to the media query based on the current window size. 
Additionally, AMP sets an inline style for width on the element. If the srcset attribute is provided, <amp-img> will autogenerate the HTML5 definition of the sizes attribute for the underlying <img>, when none is specified. If the srcset attribute is not provided, no sizes attribute will be autogenerated for the underlying <amp-img>

So sizes is a valid attribute in amp images with srcset.

Related to this, the AMP Check AMP URL fail as I can see in #113

@ithinkihaveacat
Copy link
Collaborator

Do you have a sample URL?

@Lofesa
Copy link
Author

Lofesa commented Aug 2, 2019

Sure:
https://intersindicalrm.org/?amp

@ithinkihaveacat
Copy link
Collaborator

Thanks, have created #122 to fix this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants