Skip to content

Add a way to preserve the native with and height attributes of both Image and Source components #821

@Nicolas-Yakitori

Description

@Nicolas-Yakitori

Is your feature request related to a problem? Please describe.
As far as I know, the Image and Source components only use the width and height attributes to generate the sizes and srcset and strip them from the rendered img tag.

Describe the solution you'd like
It would be nice to add a preserveSizes (or something like that) attribute to transpose these native img and source element attributes, especially with the advent of sizes="auto".

Alternative solutions
I've considered writting my own component by leveraging the transformUrl from the Unpic library

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