Skip to content

Instantly share code, notes, and snippets.

@willread
Created May 3, 2013 17:17
Show Gist options
  • Save willread/5511519 to your computer and use it in GitHub Desktop.
Save willread/5511519 to your computer and use it in GitHub Desktop.
Replace references to filename.png in a CSS file with an embedded, base64 encoded copy of the file.
sed -i -e "s|filename.png|data:image/png;base64,$(openssl base64 -in filename.png | tr -d '\n')|g" filename.css
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment