When to Inline Base64 Images: The 33% Rule
Every image on a page normally costs an HTTP request, and for a 400 byte icon that request is mostly overhead. Encoding the icon as text and pasting it directly into your stylesheet removes the round trip entirely. Knowing when to inline base64 images, though, is the difference between a snappier page and a bloated one, because the technique carries a built in size penalty and disables caching. Here's how the encoding works, what it costs, and where the break even point sits.