Persistent image hashes using createRemoteFileNode #28650
Replies: 1 comment 1 reply
-
Does your web server that serves images supports Also, quick googling shows the following "manual" alternative if your server doesn't support We do have plans to improve caching for remote files and image transformations in one of the next versions. In the meantime for development, try using lazy image transformations and query on demand features together. Enable them this way (since // gatsby-config.js
module.exports = {
flags: {
QUERY_ON_DEMAND: true,
LAZY_IMAGES: true,
}, And let us know if you see any problems. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I was wondering if there is something I can do to not regenerate all images all the time. I have a rather big amount of remote images (right now around 1.5k; it will only grow) that I need to be optimised for my Gatsby site. Currently, each time I run
gatsby develop
orgatsby build
, the images are being regenerated. This can take up 2 minutes right now. Another problem is that each time I rungatsby build
new set of images are being generated (with different hashes), so after I deploy the site, the user needs to download a completely different set of images. But he shouldn't - the images stayed the same.I'm using
gatsby-plugin-remote-images
withcreateResolvers
workaround forgatsby-source-graphql
(I've found it somewhere, and it just works):So, the problems I'm trying to find a solution for, are:
Do you guys have any ideas on how I could make this work?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions