Dust.HTML.Image (Dust v0.0.2-dev) View Source

Module to encode images to Base64 data.

Link to this section Summary

Functions

Identify image mime and Base64 encode it's content. If it fails to identify format then we try to guess if it is SVG image otherwise placeholder of error image will be returned.

Link to this section Functions

Link to this function

encode(filename, content)

View Source

Specs

encode(String.t(), binary()) :: binary()

Identify image mime and Base64 encode it's content. If it fails to identify format then we try to guess if it is SVG image otherwise placeholder of error image will be returned.