-
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
Add option to keep metadata in files processed by gatsby-plugin-sharp
#10210
Add option to keep metadata in files processed by gatsby-plugin-sharp
#10210
Conversation
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.
Looking good; left a few comments!
… check for false. Co-Authored-By: FineWolf <[email protected]>
Changes have been made as requested. (cc. @DSchau ) |
Made a quick change to ensure that our setting is passed on to Pngquant when running imagemin. |
@DSchau any news on this PR? Right now I'm relying on a fork for my builds. |
@FineWolf thanks for the ping. I'll give this another once over, and probably get it merged in. Thanks for your patience! |
Holy buckets, @FineWolf — 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! |
Successfully published: |
* master: (1421 commits) feat(gatsby-image): add onStartLoad prop (#6702) fix(docs): add Ecosystem to docs sidebar, consistency with tutorial sidebar (#10350) fix(www): Starters.yaml housekeeping (#10354) docs: add ttag starter (#10352) docs: document branching (#9983) plugin checker initial commit (#7062) docs: new starter features is required (#10353) docs: migrated line highlighting to highlight-line, highlight-start, highlight-end (#10202) Add Birra Napoli to site showcase (#10344) Add BetterDocs to site showcase (#10349) chore(release): Publish Add option to keep metadata in files processed by `gatsby-plugin-sharp` (#10210) fix(gatsby): [loki] sync db autosaves (#10212) Add Ad Hoc Homework to sites.yml (#10346) fix(graphql-skip-limit): declare `graphql` peer dependency (#10305) fix(gatsby-plugin-offline): gracefully degrade if appshell isn't precached (#10329) Service workers note (#10276) fix(docs): link fixes, podcast addition (#10332) feat(docs): Create clearer pathways in docs (#9898) feat(www): Rename community section to creators (#10312) ...
…p` (gatsbyjs#10210) * Add option to keep metadata in files processed by `gatsby-plugin-sharp` * Since pluginOptions are strictly type-checked, no need for the strict check for false. Co-Authored-By: FineWolf <[email protected]> * Changed README.md and index.js based on recommendations from @DSchau * Spelling corrections in README.md * Fixed Pngquant not respecting the stripMetadata option
Work Done
gatsby-plugin-sharp
. The old behavior remains as default.gatsby-plugin-sharp
was one of the only plugins who didn't support passing configuration thrugatsby-config.js
. The only way to enable MozJpeg was via an environment variable. This also has been normalized while maintaining old behavior as default.Reasoning
I'm currently rebuilding my website with
gatsby
. While I was working on my portfolio section, I noticed that many of my pictures were rendering differently in Firefox vs Chrome due to the lack of ICC profile attached to the image (untagged images in most browsers render using the Monitor's RGB profile; Chrome seems to assume the pictures are using sRGB IEC61966-2.1). Also, I tend to like to keep my Copyright EXIF information on my images.This PR (with no breaking changes to old behavior) allows us to specify if we want to strip metadata in the images or not.