Skip to content

Instantly share code, notes, and snippets.

@dhcmrlchtdj
Created August 15, 2016 04:03
Show Gist options
  • Save dhcmrlchtdj/89a647adfd9048d1f0d11d6761169622 to your computer and use it in GitHub Desktop.
Save dhcmrlchtdj/89a647adfd9048d1f0d11d6761169622 to your computer and use it in GitHub Desktop.
datauri() {echo "data:image/${1##*.};base64,$(openssl base64 -in $1 | tr -d '\n')"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment