PhoenixImageTools (phoenix_image_tools v0.3.0)
View SourcePhoenixImageTools is a comprehensive solution for handling responsive images in Phoenix applications.
This library provides tools for:
- Uploading and processing images
- Creating multiple image sizes for responsive web applications
- Converting images to optimized formats (WebP)
- Providing Phoenix LiveView components for responsive image display
- Supporting S3-compatible storage
Summary
Functions
Returns the configured write options for image processing.
Returns the configured bucket name for S3 storage.
Returns the width for a given size name.
Returns the configured image sizes.
Returns the configured cache control max-age value in seconds.
Returns the configured output extension for processed images.
Returns the configured streaming options for image processing.
Returns the configured thumbnail options for image processing.
Returns the configured write options for image processing.
Functions
Returns the configured write options for image processing.
Returns the configured bucket name for S3 storage.
Returns the width for a given size name.
Examples
iex> PhoenixImageTools.get_width_from_size(:md)
1024
Returns the configured image sizes.
Examples
iex> PhoenixImageTools.image_sizes()
[xs: 320, sm: 768, md: 1024, lg: 1280, xl: 1536]
Returns the configured cache control max-age value in seconds.
Examples
iex> PhoenixImageTools.max_age()
31536000
Returns the configured output extension for processed images.
Examples
iex> PhoenixImageTools.output_extension()
"webp"
Returns the configured streaming options for image processing.
Returns the configured thumbnail options for image processing.
Returns the configured write options for image processing.