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.
3 articles tagged “encoding”.
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.
Base64 is an encoding, not a cipher. It has no key, protects nothing, and is trivially reversible — here is what it is actually for.
Base64 strings sometimes end in one or two equals signs and sometimes end in none at all. Here is the bit-level reason why, and when it's safe to drop them.