Created
April 11, 2011 10:01
-
-
Save alotaiba/913308 to your computer and use it in GitHub Desktop.
How to encode images to base64 for HTML using openssl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Credit goes to Marcel http://narings.net/blog/archives/4 | |
echo "<img src=\"data:image/png;base64,`openssl base64 -in img.png | tr -d '\n\'`\">" > page.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment