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

chore: Update image API to remove maxWidth/maxHeight #28985

Merged
merged 10 commits into from
Jan 12, 2021

Conversation

laurieontech
Copy link
Contributor

@laurieontech laurieontech commented Jan 11, 2021

Going forward, fixed/constrained images will take width and height as parameters, rather than the previous option of maxWidth/maxHeight for fluid and constrained images.

Open question: Right now fluid can take width and height. At what level do we want to warn the user to use breakpoints instead? Or do we want to cover that in the forthcoming breakpoints PR?

(Note that the failing tests are based on the plugin helpers, I'm missing something there)

READMEs outside of gatsby-plugin-image are also not updated as versioning those is not clear. Should determine that before merging this PR.

[ch22681]

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 11, 2021
@laurieontech laurieontech added topic: media Related to gatsby-plugin-image, or general image/media processing topics and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jan 11, 2021
@ascorbic
Copy link
Contributor

The types in utils.ts were hopelessly out of date (and mostly unused), so I've removed them and shuffled stuff around so that everything shares the same typings for those props.

ascorbic
ascorbic previously approved these changes Jan 12, 2021
Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

I'd be happy to merge this if you're ready for it to come out of draft

@laurieontech laurieontech marked this pull request as ready for review January 12, 2021 13:31
Copy link
Contributor

@ascorbic ascorbic left a comment

Choose a reason for hiding this comment

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

🎉

@laurieontech laurieontech merged commit a8c2f39 into master Jan 12, 2021
@laurieontech laurieontech deleted the image-update-keys branch January 12, 2021 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: media Related to gatsby-plugin-image, or general image/media processing topics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants