Skip to content

lighthouse performance impacted by images #26

@ghost

Description

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions