Behaviour contract for image previewers that generate preview images from non-image files.
Implementations are dispatched by Attached.Processors.ImagePreviewers.
Summary
Callbacks
Returns true if this image previewer handles the given content type.
Returns true if this image previewer's runtime dependencies are present (NIF compiled, CLI tool on PATH, etc.). Unavailable image previewers are skipped by the dispatcher, so the next one in the list can try.
Returns a short, actionable string explaining how to satisfy this image previewer's runtime dependencies — hex deps to add, system packages to install, binaries to provide on PATH.
Generate a preview image from input_path and write it to output_path.
Callbacks
Returns true if this image previewer handles the given content type.
@callback available?() :: boolean()
Returns true if this image previewer's runtime dependencies are present (NIF compiled, CLI tool on PATH, etc.). Unavailable image previewers are skipped by the dispatcher, so the next one in the list can try.
@callback install_hint() :: String.t()
Returns a short, actionable string explaining how to satisfy this image previewer's runtime dependencies — hex deps to add, system packages to install, binaries to provide on PATH.
Shown in the dashboard for every image previewer (not only unavailable ones) so operators can use the list as an install checklist.
Generate a preview image from input_path and write it to output_path.