Replies: 5 comments 13 replies
-
This is great news. It is encouraging to see that the issue is being worked on. I noticed an issue with a message when the build starts:
Looks like part of the message is missing Looking forward to seeing feature land for everyone |
Beta Was this translation helpful? Give feedback.
-
I've tested this feature for local development of https://coggscircus.com/ and enabling lazy image processing reduced "server boot finished" time from Using both lazy image processing and query on demand together produced the best results, reducing the "server boot finished" time further still to only Based on these experiences, I will probably use this lazy image processing feature on all existing and future Gatsby projects, but wait to use the query on demand feature until it's a bit more polished. |
Beta Was this translation helpful? Give feedback.
-
A heads-up for those using this and found that some images load and others don't: check your file names. I ran into an issue where some images from our CMS were being processed at build time, but a lot of them were not and it was because a publisher had uploaded images with the So watch out for filename encoding issues! :) |
Beta Was this translation helpful? Give feedback.
-
Beware 🚨 I've just spent several hours investigating a strange problem with gatsby-plugin-manifest, where it failed to process an icon with
This error occurred only in CI on It smelled like this issue, but adding In the end, I simply installed the latest versions of Here are my gatsby dependencies
And the stats of problematic CI environment
The environment spins up circleci/node:erbium docker image and yes, it runs on circle CI. The version of sharp is the same, |
Beta Was this translation helpful? Give feedback.
-
Thanks everyone for testing! This was enabled by default in 2.30: https://www.gatsbyjs.com/docs/reference/release-notes/v2.30#query-on-demand-and-lazy-images-generally-available |
Beta Was this translation helpful? Give feedback.
-
Released in 2.30: https://www.gatsbyjs.com/docs/reference/release-notes/v2.30#query-on-demand-and-lazy-images-generally-available
Hi 👋,
Gatsby is a great tool to develop your website. We've got some feedback that the more image-heavy your website gets, the slower
gatsby develop
. I've got good news for all of you, we've got an experimental feature (behind a flag) that only does image processing when an image gets requested by the browser.To use it, make sure you have
gatsby@^2.28.0
andgatsby-plugin-sharp@^2.10.0
and addLAZY_IMAGES
to flags ingatsby-config.js
:If you want to opt-out - set the
LAZY_IMAGES
flag tofalse
.We'll only do lazy images processing during "develop". On "build" we process all images that haven't been processed yet. Note that there might still be issues, so when you switch between develop & build, so be careful when you deploy your site from your machine.
Please comment below if you encounter any bugs/issues... Please react with an 👍 emoji if you like this feature.
PS. You might also be interested in Query on-demand in gatsby develop that applies a similar mechanism but on query running. In fact - it would be awesome to check them both at the same time and play with enabling one or the other (and both for most "laziness") and let us know which of the two does make a bigger impact for you.
Happy dev'ing!
Beta Was this translation helpful? Give feedback.
All reactions