Skip to content
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

Img support for size/srcset #7

Open
Mte90 opened this issue Sep 14, 2021 · 4 comments
Open

Img support for size/srcset #7

Mte90 opened this issue Sep 14, 2021 · 4 comments

Comments

@Mte90
Copy link

Mte90 commented Sep 14, 2021

In this way there is no css involved :-)

@westonruter
Copy link
Collaborator

I'm not sure I understand. How do responsive images relate to reducing layout shift? The fundamental problem is when an img lacks width and height which is true for images that have size/srcset as well as those which lack these responsive image attributes.

@Mte90
Copy link
Author

Mte90 commented Sep 16, 2021

Reading as example https://web.dev/swappie/ confirm that give the right width/height sizes to img tags is important.
Also this will avoid to add css code and you can have a html tag with everything ready for a copy and paste.

@westonruter
Copy link
Collaborator

So do you mean supply width and height to a provided img instead of adding the media/container queries with min-height?

This would essentially be the same as I've proposed in #3 but specific to img elements (and video).

@Mte90
Copy link
Author

Mte90 commented Sep 17, 2021

I think yes, as often there are issues with images in LightHouse and this can help on understand what's going on without debugging to much.

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

No branches or pull requests

2 participants