Skip to content

Improve responsive image sizing for cover images#255

Open
Michael-Schaer wants to merge 1 commit intomainfrom
fix_wide_image_dpi
Open

Improve responsive image sizing for cover images#255
Michael-Schaer wants to merge 1 commit intomainfrom
fix_wide_image_dpi

Conversation

@Michael-Schaer
Copy link
Contributor

  • Increase JPEG quality from 85 to 90 for better image quality
  • Add data-cover attribute support to detect cover images (object-fit: cover)
  • Set sizes attribute to 200vw for cover images to account for ~2x zoom from aspect ratio mismatch
  • Remove JavaScript-based dynamic sizes calculation in favor of static sizing

- Increase JPEG quality from 85 to 90 for better image quality
- Add `data-cover` attribute support to detect cover images (object-fit: cover)
- Set `sizes` attribute to `200vw` for cover images to account for ~2x zoom from aspect ratio mismatch
- Remove JavaScript-based dynamic sizes calculation in favor of static sizing
Copy link
Member

@sandrotanner sandrotanner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merci

Michael-Schaer added a commit that referenced this pull request Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants