Skip to content

Issue with responsive images and DPR on mobile #49

@alexpainter

Description

@alexpainter

When responsive images are used with srcset, it looks as though images that are the right size are highlighted in blue (too small) and images that are too big are highlighted in green (OK) when emulating a mobile device with a high DPR in Devtools. I think this might be to do with using naturalWidth for the image element, rather than looking to naturalWidth of currentSrc - demo page here: https://www.alexrp.co.uk/nl/testresponse.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions