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

feat(gatsby-plugin-image): Change fullWidth to use breakpoints #29002

Merged
merged 12 commits into from
Jan 14, 2021

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Jan 12, 2021

New API for fullWidth images. Instead of using maxWidth and pixel density to determine output image sizes, this uses fixed breakpoint sizes. Includes default breakpoints of [750, 1080, 1366, 1920]. Any breakpoint that is larger than the source image is filtered-out, and the source width is added instead.

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jan 12, 2021
@ascorbic ascorbic 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 12, 2021
@ascorbic ascorbic marked this pull request as ready for review January 13, 2021 10:56
@ascorbic ascorbic changed the title feat(gatsby-plugin-image): Change fluid to use breakpoints feat(gatsby-plugin-image): Change fullWidth to use breakpoints Jan 13, 2021
Copy link
Contributor

@laurieontech laurieontech left a comment

Choose a reason for hiding this comment

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

This looks awesome. Definitely think it'll generate more appropriate sizes in the majority of cases.

packages/gatsby-plugin-sharp/src/image-data.ts Outdated Show resolved Hide resolved
Co-authored-by: LB <laurie@gatsbyjs.com>
laurieontech
laurieontech previously approved these changes Jan 13, 2021
@ascorbic ascorbic added bot: merge on green Gatsbot will merge these PRs automatically when all tests passes and removed bot: merge on green Gatsbot will merge these PRs automatically when all tests passes labels Jan 13, 2021
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.

2 participants