Last Updated: February 25, 2016
· ndorfin

Compass mixin for data URIs

Not sure if you've heard of this before, but Compass comes with a function to convert an image asset into a base64 data URI, using #{inline_image()}
An example:

   background: rgb(203,210,216) #{inline_image("pinstripes.png")}


1 Response
Add your response

Thanks for this. I am familiar with doing this on the command line with openssl base64 and just thought "I wonder if compass...". :)

over 1 year ago ·