Skip to content

Set height with sizes attribute #900

Open
@wokalek

Description

@wokalek

Usecase: you have long image (width > height) and you need square to thumbnail, eg:

image

You cant do object: cover, because settings sizes="'xs:72px sm:102px md:114px lg:138px xl:160px xxl:184px 2xl:552px'" do this:

image


image

It's blurry and not 138x138.
But if you specified fit="cover", it doesn't help, because getSizes receives already counted 138x82 as width/height

So, what if you can provide height in sizes property xs:72x72 sm:102x102 md:114x114 lg:138x138 xl:160x160 xl:184x184 2xl:552x552?

And with this fit modifier will work!

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