4 min read
When to Base64-Encode an Image (and When Not To)
Data URIs let you embed an image directly in HTML or CSS as Base64 text. It works, it's overused, and it makes some pages slower rather than faster.
2 articles tagged “images”.
Data URIs let you embed an image directly in HTML or CSS as Base64 text. It works, it's overused, and it makes some pages slower rather than faster.
Modern browsers can decode, resize and re-encode images locally using Canvas. Here is how it works, what quality setting to pick, and where the approach breaks down.