-
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-transformer-sqip] - current state & todo #5224
Comments
On Netlify — I found out recently they don't let you set directories to cache so actually none of Gatsby's caches work atm 🤷♂️ |
Would you like to write a blog post introducing the technique/plugin as well? |
Yeah, thats a pity. Do you have contacts to Netlify to talk about this? Would speed up Gatsby deployments a lot 🚀 About the blog post: Already working on it, my research is done and as the PR is now merged in Gatsby, I have more or less everything on the code side ready. Just writing the actual blog post is missing 💪 |
You could try @philhawksworth at Netlify (DevRel) I've just run into what looks like Netlify issues myself while deploying the results of my testing - the site seems to hit the build timeout limit (around 30 minutes?). It sounds like you're aware of this issue @axe312ger and have managed to get around it somehow - any tips? The build log doesn't report much:
EDIT: Local build with a clean directory doesn't take very long (there's only 3 images to process on this test branch), so I'm not sure what Netlify is tripping up on. This is the local build output:
|
You are right @martynhoyer, builds on Netlify are limited to a 30 minute duration. Typically that is waaaay bigger than people need. We make exceptions for those on Enterprise plans where we provide dedicated build infrastructure. Even there, exceeding 30 mins is not very common. As @KyleAMathews mentions, there is no documented way for people to access a build cache to stash things between builds. However, it is possible. \o/ It's not currently documented because managing a cache between builds can get complex and the levels of support requests we see to help people manage their own internal build caching logic can quickly spiral. However, if you are happy to shoulder the responsibility of managing your own intra-build cache on Netlify, this will likely help the scenario you are describing here. I put together a basic proof of concept to illustrate this: https://github.com/philhawksworth/content-shards This example lets you run your static site generator to target one section of a site or another, and then use a previously built set of assets for the rest of the site. The area of particular interest will be int he gulp file where the build cache is accessed: https://github.com/philhawksworth/content-shards/blob/master/gulpfile.js#L62-L69 and also where the cache location is defined: https://github.com/philhawksworth/content-shards/blob/master/gulpfile.js#L62-L69 Since every build is containerized, you can't damage the environment for anyone else, or for your other deploys... but by messing with that I hope this helps! |
there are actually edit: adressed in #5469 |
@philhawksworth - Thanks for your extended reply and that demo repository. Will put this somehow in the documentation at #5287 😄 @martynhoyer - My fellow coworker @stefanjudis combined SQIP with the Netlify build cache in his recent article: https://dev.to/stefanjudis/faster-static-site-builds-part-1--process-only-what-you-need-2j70 🚀 |
Looks like Safari has issues to display the svgs as img tag dataURI. Just getting black boxes. Anybody can confirm? Edit: okay, that was just the black background and the images had opacity: 0. But the fade animation is failing in safari, resulting in these black boxes instead of a nice fade. Will investigate. |
Old issues will be closed after 30 days of inactivity. This issue has been quiet for 20 days and is being marked as stale. Reply here or add the label "not stale" to keep this issue open! |
This issue is being closed due to inactivity. Is this a mistake? Please re-open this issue or create a new issue. |
This issue gathers all information about the current state of the SQIP implementation in Gatsby. It is a follow up to #4205.
First of all: It got merged, a very first version is published and can already be used in your website. 🎉
Wanna see it in action? Click here for the demo
What is SQIP?
It is a svg based implementation of low quality image previews (LQIP)
An algorithm calculates a primitive representation of your images based on simple shapes like circles, ellipses, triangles and more. These will be embedded in your initial HTML payload.
This will help your users to get a feeling of how the pictures will look like, even before they got loaded by their (probably) slow connection.
Current State
v0.x.x
and can be used by early adoptersOpen todos & problems
You are very welcome to support me here, just do a PR, mention this issue. Feel free to contact me for questions via Twitter, the Gatsby Discord or just leave a comment here.
👨💻 👩💻 Code (@todo, help is very welcome)
gatsby-transformer-sqip
for proper progress indication and to avoid performance bottlenecks.📜 Documentation (Adressed in #5287)
using-sqip
example as a reference for now)👋 ,
Benedikt
The text was updated successfully, but these errors were encountered: