gatsby-plugin-sharp | Support withoutEnlargement #29873
Replies: 5 comments
-
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Beta Was this translation helpful? Give feedback.
-
Our team also need that feature, any ETA? Thanks! |
Beta Was this translation helpful? Give feedback.
-
This is the default behaviour in the new |
Beta Was this translation helpful? Give feedback.
-
Thank you, I'll take a look at the new resolver |
Beta Was this translation helpful? Give feedback.
-
It's still in beta, but should be stable next month |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
The Sharp resize() function has a useful option: withoutEnlargement that can be used to prevent source images from being enlarged beyond their original size, which helps prevent undesirable degradation in image quality. It would be nice if Gatsby Plugin Sharp exposed this option as a Shared Option.
Basic example
Motivation
There are use cases where it is desirable to limit the resizing of an image to sizes that are <= its original size, in order to prevent loss in image quality. The withoutEnlargement option allows you to enforce this restriction. It would be great if Gatsby's Sharp plugin exposed this functionality.
Beta Was this translation helpful? Give feedback.
All reactions