Skip to content

Parse width presets for use in sizes values #1251

@mukeshpanchal27

Description

@mukeshpanchal27

As described in #1187 (comment), If the image is smaller than the content or wide size, it returns the wrong (bigger) size. In such cases, we need to return the smaller value among the image width, content size, or wide size.

The different widths used in theme.json for content and wide size.

  • 620px
  • min(640px, 90vw)
  • 90vw

We should parse the width so we can use proper width in sizes to get proper image size.

Metadata

Metadata

Labels

[Plugin] Enhanced Responsive ImagesIssues for the Enhanced Responsive Images plugin (formerly Auto Sizes)[Type] EnhancementA suggestion for improvement of an existing feature

Type

No type

Projects

Status

Done 😃

Relationships

None yet

Development

No branches or pull requests

Issue actions