About this project
Images are where most websites quietly lose their speed, and the usual fix is to hand your visitors' traffic to an image service somewhere else. We would rather not, so we built the piece ourselves.
A picture is resized to the sizes actually used and re-encoded to modern formats, and the browser is handed the set so it can pick what fits its screen. On a server-rendered site that happens through our own endpoint; on a static one the variants are baked at build time. Same code either way, so a site does not need a different approach because of how it is deployed.
It is a small piece of infrastructure with an outsized effect, and it runs on every site we ship. The photographs on this page went through it on the way to you.
Highlights
- Modern formats and the right size for the screen that asked
- No third-party image service in front of our visitors
- One approach for server-rendered and static sites alike
- Running on every site we ship, including this one