Created
April 2, 2019 13:58
-
-
Save davidicus/24d2eec06692f6081825ed9265bbf7f9 to your computer and use it in GitHub Desktop.
Create Data URI from image
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
# https://superuser.com/questions/120796/how-to-encode-base64-via-command-line#comment280484_120815 | |
# create and copy URI to clipboard | |
openssl base64 < path/to/file.png | tr -d '\n' | pbcopy | |
# or | |
cat path/to/file.png | openssl base64 | tr -d '\n' | pbcopy | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment