Base64 images: when to inline them (and when not to)
Base64 data URIs save a request but cost caching, lazy loading and render speed. Measured sizes, the cases where inlining helps, and why SVG should be URL-encoded instead.
Topic
Making pages load and respond faster: images, fonts and the code around them.
3 articles
Base64 data URIs save a request but cost caching, lazy loading and render speed. Measured sizes, the cases where inlining helps, and why SVG should be URL-encoded instead.
srcset lists your image files, sizes says how wide the image is shown, and the browser picks the smallest sharp file. Worked examples, common layouts and the new sizes="auto".
BlurHash, LQIP, gradients or a single colour: how each image placeholder works, what it costs, and how to use them without layout shift.
Enjoying Refract Tools? ☕️
Refract is a personal project built to make design and development a little easier, with practical, intuitive tools that help you work smarter, without AI doing the work for you.
If you find the tools useful, consider buying me a coffee. Every bit of support helps me keep building, improving, and sharing more free tools with the community.
Thanks for being here! ❤️
Buy me a coffee