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

lighthouse performance impacted by images #26

Open
ghost opened this issue Jan 4, 2022 · 0 comments
Open

lighthouse performance impacted by images #26

ghost opened this issue Jan 4, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Jan 4, 2022

Hi, I hope this is the right place to bring up this issue. I have a small demo app using the Pexels API and because it pulls images of varying sizes, I can't set the image width and height specifically. I've tried just setting both to auto but Lighthouse will still flag the issue. (Obviously I want the images responsive so I've also set the max-width to 100% and the height to auto.)

I looked at the API response and I see that the large image is set to a certain size:

"large": "https://images.pexels.com/photos/2880507/pexels-photo-2880507.jpeg?auto=compress&cs=tinysrgb&h=650&w=940",

However, the actual sizing is inconsistent [repo made private].

If I add the appropriate width and height as attributes the photos do not scale properly. I think the page looks great with the varying sizes but it kills the performance. Is there a known way around this?

Thanks for reading :)

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

0 participants