-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
feat(gatsby-source-contentful): Remove default image transform width #14159
feat(gatsby-source-contentful): Remove default image transform width #14159
Conversation
I have no idea why the end-to-end test is failing. It's failing on the |
I re-run the CI, seems like it was a hiccup. What do you think about adding some notes to the README, e.g. about the defaults for width/height? |
@LekoArts, sure! I'll try to add the changes to the documentation as soon as possible! |
…dth' of https://github.com/LuudJanssen/gatsby into topics/gatsby-source-contentful-remove-default-image-width
@LekoArts, I merged the Should we file issues to those repositories to fix this difference? Also, I noticed |
Also, @LekoArts, I'm experiencing build issues again. |
Sorry for that, sometimes development runtime tests are flaky. After restarting them we are good again.
I think it's worth at least notifying datocms and sanity we did this change and they might apply it too for uniformity
There might be already lib for that. This could be good idea (depending how much that utility would abstract and make it easier to read code), but it's not critical to do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @LuudJanssen for PR and patience with review
Holy buckets, @LuudJanssen — we just merged your PR to Gatsby! 💪💜 Gatsby is built by awesome people like you. Let us say “thanks” in two ways:
If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’. Thanks again! |
Published in |
Description
This PR resolves the width of an image automatically using the aspect ratio when only the height is given in an image transform. Previously, a default width was used resulting in a cropped image.
This PR also creates unit tests to test this behaviour.
Related Issues
Fixes #14156
Related to #6752
Related to #6954
Related to this pull request about removing the default width when using gatsby-transformer-sharp
Related to this pull request about calculating the right dimensions / aspect ratio based on the passed arguments when using gatsby-plugin-sharp