Data uri’s for images in command line (Mac OSx)
If you want to get the data-uri for images via command line. Use the following command.
openssl base64 -in /path/to/file.png | tr -d ‘\n’ | pbcopy
This will return the string to your clipboard and you can cmd+v it in your code. For example
background: url(‘data:image/png;base64,[return string]’);
Thank you @matijs from http://hotfusion.org
Source: hotfusion.org
