-
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
[gatsby-plugin-sharp] Cache base64 calculations #6999
Comments
Hey, i would like to give this a go if nobody is touching this (mainly because i work on an image heavy site :) ) |
pieh
pushed a commit
that referenced
this issue
Nov 6, 2018
Closes: #6999 <!-- Q. Which branch should I use for my pull request? A. Use `master` branch (probably). Q. Which branch if my change is a bug fix for Gatsby v1? A. In this case, you should use the `v1` branch Q. Which branch if I'm still not sure? A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :) Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2. Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/ -->
gpetrioli
pushed a commit
to gpetrioli/gatsby
that referenced
this issue
Jan 22, 2019
Closes: gatsbyjs#6999 <!-- Q. Which branch should I use for my pull request? A. Use `master` branch (probably). Q. Which branch if my change is a bug fix for Gatsby v1? A. In this case, you should use the `v1` branch Q. Which branch if I'm still not sure? A. Use `master` branch. Ask in the PR if you're not sure and a Gatsby maintainer will be happy to help :) Note: We will only accept bug fixes for Gatsby v1. New features should be added to Gatsby v2. Learn more about contributing: https://www.gatsbyjs.org/docs/how-to-contribute/ -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently we memoize base64 resizes/calculations in
gatsby/packages/gatsby-plugin-sharp/src/index.js
Line 431 in 9db958c
I can't remember if gatsby-plugin-sharp has access to the global gatsby cache. If not, that needs fixed.
The cache key should be the file's contentDigest + the meaningful arguments e.g.
cropFocus
, image format,grayscale
, etc.The text was updated successfully, but these errors were encountered: