-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[MASTER FEATURE] <amp-img> autogenerate sizes #19513
Comments
@ayumihamsaki totally agree this would be a great feature. We have talked about it in the past #11575 (comment) . Thanks for the reference to lazysizes framework as well. |
With #21742, this feature has now been launched to 100% of production. We'll monitor for a week and track/fix any bugs here. Following that, I will remove the experiment, update documentation, and close this issue. |
@cathyxz Thank you for all your hard work, has this been mentioned in the doc's or is it just a case of adding the attribute |
Hi @ayumihamsaki ! You can just leave the This is not yet in documentation yet--I will document that when we have monitored it sufficiently and are ready to remove the experiment flag. If you see errors, you can just comment on this github issue and tag me. |
I find making Responsive Images in amp-html actually harder than normal HTML (which should not be the case).
Take the following code examples:
The first example I am going to create a responsive image in normal html using the wonderful lazysizes library, see code example:
The above library does the hard work for you with the attribute
data-sizes="auto"
Taken from their Spec: "lazysizes supports setting the sizes attribute automatically, corresponding to the current size of your image - just set the value of data-sizes to auto."
I would love to see the feature in AMP-HTML so we can create the following code example:
The text was updated successfully, but these errors were encountered: