Still.Preprocessor.Image.Adapter behaviour (Still v0.6.0) View Source
Adapter definition to be used by Still.Preprocessor.Image.
An adapter implements the render/1 function. It is only called when
:image_opts are defined within the :metadata field of the source file
(see Still.SourceFile).
The render/1 function should create several versions of the same images,
given the :sizes and :transformations options. The purpose of this
function is to support the responsive_image/2 template helper. See
Still.Compiler.TemplateHelpers.ResponsiveImage.render/2 for details on how this
template helper works.
:sizes defines the widths of the output files to create.
:transformations defines the function name and arguments to call on the
adapter. By default, the adapter is Still.Preprocessor.Image.Mogrify.
You can change the adapter by altering your config:
config :still, :image_adapter, Still.Preprocessor.Image.Imageflow
The Imageflow adapter requires you to have
:still_imageflow as a
dependency.
Link to this section Summary
Link to this section Callbacks
Specs
Specs
render(%Still.SourceFile{
content: term(),
dependency_chain: term(),
extension: term(),
input_file: term(),
metadata: term(),
output_file: term(),
profilable: term(),
run_type: term()
}) :: %Still.SourceFile{
content: term(),
dependency_chain: term(),
extension: term(),
input_file: term(),
metadata: term(),
output_file: term(),
profilable: term(),
run_type: term()
}