-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Description
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)
What? I understand nothing
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
- It is feature complete
- It is published as a
v0.x.xand can be used by early adopters - Everything seems to work fine already, but performance and other things are not optimal yet. Decide on your own if it is ready for production.
- We have an example which demonstrates how to integrate it into your Gatsby website.
Open 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)
- something still goes wrong with the sharp focus. The actual image and the calculated SQIP do sometimes not share the same center
- It currently implements its own queue. We should change this to use the queue from
gatsby-transformer-sqipfor proper progress indication and to avoid performance bottlenecks.
📜 Documentation (Adressed in #5287)
- Readme & Example page need some more love, some important documentation is missing (Use
using-sqipexample as a reference for now) - It seriously needs proper caching between builds when using services like Netlify. We need to make this very clear to the users
- We should give some recommended settings. These depend a lot on your use case, current website payload size and more. I did some research about this at https://axe312ger.github.io/embedded-svg-loading-impact-research/
👋 ,
Benedikt
