Skip to content

no support for pixel density descriptor (e.g. 2x)? #15

Open
@larsbo

Description

@larsbo

When a srcset image is specified with a pixel density descriptor instead of a width descriptor as explained here:
https://webkit.org/blog/2910/improved-support-for-high-resolution-displays-with-the-srcset-image-attribute/
or more detailed in the official spec:
https://html.spec.whatwg.org/multipage/embedded-content.html#width-descriptor
the higher resolution image will be removed from srcset.

For example something like this

<img class="responsively-lazy" [...] data-srcset="image/3945799cca93f17f_280x280.jpg, image/[email protected] 2x">

will be transformed into this

<img class="responsively-lazy" [...] srcset="image/3945799cca93f17f_280x280.jpg">

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions