Base64 encode images (Mac terminal)
No installs required, just change the filename and you're all set!
$ openssl enc -base64 -in YOUR_FILE.png | tr -d '\n'
Even better:
First compress / minify your images (using a tool like ImageOptim).
Uncompressed .png file (200x70 pixels) outputs as 4764 characters
The same file, compressed: outputs as 1749 characters! Which is only 36% of the original size!
Written by Alex Meijer
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Css
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#