SVG v1.1.2 mix svg.encode View Source

Replaces urls to SVGs in your CSS files with the Base64 encoded value.

By default, it will look at /priv/static/css for CSS files, and /priv/static/images for the SVG files.

Example CSS (original):

background-url: url(/icons/add.svg)

After SVG.Encode:

background-url: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0ia...)

For production deployments, run before mix phx.digest.