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

Layout shifts caused by not having explicit width and height attributes on image tags #137

Open
stepbrobd opened this issue Jun 10, 2024 · 1 comment

Comments

@stepbrobd
Copy link

To reproduce, add an image (preferably one with relatively large size, perhaps 1000x1000) to any page, then deploy to prose.sh

You should be able to see the layout shift pretty prominently. Lighthouse can also detect CLS (https://pagespeed.web.dev/ if you are not using a Chromium based browser).

Since all images uploaded to pico are static, can height and width attributes be automatically set based on the image metadata?

@neurosnap
Copy link
Member

Hi thanks for submitting this issue! I'll look into ways to reduce layout shifting from images and report back in this thread. Thanks again!

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