17th January
written by Marcel

Recently I found (through Twitter) two nice articles on data URIs: How To Reduce The Number Of Http Requests and Data URIs explained. The base64 encoding of images on a Mac is very easily done through the terminal:
echo "<img src=\"data:image/png;base64,`openssl base64 -in picture.png | tr -d '\n\'`\">" > picture.html

Replace picture.png and picture.html with your own files. Watch out for those backtick’s ;-)

Tags: , ,
Comments Off