Feature Request: Skip / Speedup Image Generation Processes
See original GitHub issueSummary
i would like to skip the step of creating image thumbnails and create “fake” thumbnails.
Basic example
-
i set some option to skip the thumbnail creation / image processing
-
it creates “Fake” imagesets, and i can query all sharp image options from GraphQL, but it always return the original image without changes
-
i don’t remember if there was planned an api for different image manipulation providers (image sharp, external services, lambda functions, gatsby cloud) - but then it can set up with a fake image service…
Motivation
- i running the
gatsby develop
command in the gatsby doc site. - in some times something needs to run
gatsby clean
and the thumbnails are not cached anymore and it needs recreated - in most times i do not care of the image quality while developing
Times:
1943.298 s 2678/4226 63% Generating image thumbnails
success run page queries - 1329.928s - 4622/4622 3.48/s
success Generating image thumbnails - 2196.493s - 4226/4226 1.92/s
about 36min 😦
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:29 (18 by maintainers)
Top Results From Across the Web
David Cramer on Twitter: "@sirwart @cameronmcefee IMO if I did it ...
Feature Request : Skip / Speedup Image Generation Processes · Issue #24822 ... Summary i would like to skip the step of creating...
Read more >A survey on Image Data Augmentation for Deep Learning
This survey will present existing methods for Data Augmentation, promising developments, and meta-level decisions for implementing Data ...
Read more >Speed up Docker image build process of a Rails app - BigBinary
A feature request for providing a shared host machine directory path option to the docker build command is still open here. To reuse...
Read more >8 Tips for Faster Puppeteer Screenshots - Bannerbear
When optimizing Puppeteer, remember that there are only so many ways to speed up the startup/shutdown performance of Puppeteer itself.
Read more >9 Quick Ways to Improve Page Loading Speed - HubSpot Blog
Speed Up Your Website with HubSpot's Built-In CDN ... a page redirects somewhere else, it prolongs the HTTP request and response process.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Looks like I created a duplicate here - https://github.com/gatsbyjs/gatsby/issues/25827
There’s a bunch of options I considered for a project I work on.
I think there’s two ideas that are worth pointing out:
gatsby-plugin-sharp
to return original image src without doing the time consuming resizing when indevelopment
. This way my earlier mentioned GraphQL would still work, but every value would be the same unresized image src. It’s a sort of by-pass without breaking the application.It could look something like this:
package.json
/yarn.lock
and/orgatsby-config
This a major problem for one project I’m working on. Every time I add or update an unrelated NPM package Gatsby blows away the image cache and I can’t work for 2 hours (yes, literally, and on an 8 core i9 CPU) while it regenerates 80k image thumbnails. It’s brutal. Our Gatsby Cloud builds can do it in about ~45 minutes by comparison.
For this use case, I can think of two approaches to mitigate this:
Make the cache more resilient/reusable. Can we narrow down what changes necessitate blowing away the image cache?
In ‘develop’ mode, could these be generated lazily at the point of need/access? Generating 80k images upfront that I almost certainly don’t even need makes working with Gatsby locally incredibly painful.