Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💄 Improve resizing for article thumbnails #327

Merged
merged 1 commit into from
Dec 18, 2022

Conversation

chrisbanes
Copy link
Contributor

@chrisbanes chrisbanes commented Dec 15, 2022

Currently, the image is resized to be 600px, which will work for most images, but causes issues for images which have very wide aspect ratios. This change updates the partials to use a Fill with an appropriate bounding box, rather than a simple resize. The bounding box chosen roughly matches what the displayed aspect ratio ends up at.

You can read more about Fill here.

To show an example, here's the current behavior for a wide image:
Screenshot 2022-12-15 at 18 29 33

...and with this PR:

Screenshot 2022-12-15 at 18 27 55

Currently, the image is resized to be 600px, which will work for
most images but caused issues for images which have very wide
aspect ratios. This change updates the partials to use a Fill with
an appropriate bounding box, rather than a simple resize.
@nunocoracao nunocoracao changed the base branch from main to dev December 18, 2022 11:46
@nunocoracao nunocoracao changed the title Improve resizing for article thumbnails 💄 Improve resizing for article thumbnails Dec 18, 2022
@nunocoracao nunocoracao merged commit 9059b55 into nunocoracao:dev Dec 18, 2022
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