All notable changes to this project will be documented in this file.
Latch::ProcessingErrorwraps variant and original processing failures with the variant name, processor name, and original exception ascause.
- Nilable variant accessors (e.g.
stored.versions_thumb?) returnnilif the variant hasn't been processed yet, useful for safe template rendering.
- FFmpeg processor for video and audio transformations with compile-time validated options (codec, bitrate, scaling, thumbnails, and more).
- Vips processor using
vipsthumbnailfor high-performance image processing with smart cropping, quality control, and format conversion. - DimensionsFromVips extractor using
vipsheaderas an alternative to the ImageMagick-based dimension extractor. - File attachment validations for Avram SaveOperations:
validate_file_size_ofandvalidate_file_mime_type_of(with allowed list or regex pattern). StringOrInttype alias for processor options likequality,crf,rotate,density,frames,frame_rate, andduration, allowing both integer and string values.- Expanded ImageMagick options:
auto_orient,background,colorspace,density,flatten,gaussian_blur,interlace,rotate,sampling_factor,sharpen,strip, andthumbnail. - Background processing example with Mel in the README.
- StoredFile extensibility example in the README.
- Processor option
qualityacceptsInt32in addition toStringacross all built-in processors. - Processing block in Avram
attachnow takes a single argument (the record) instead of two (stored file and record). The stored file is accessible via the record. - Simplified nilability detection in processor macros using
resolve.nilable?.
- Variant cleanup on delete:
StoredFile#deletenow removes all variant files before deleting the original. - ImageMagick processor now converts underscores to hyphens in option names
(e.g.
auto_orientbecomes-auto-orient). - ImageMagick processor falls back to
convertwhenmagickis not available (ImageMagick 6 compatibility). - Extractor aliases removed to avoid having two ways to reference the same extractor.
- FFmpeg processor for video and audio transformations.
- Vips processor for high-performance image processing.
- DimensionsFromVips extractor as an alternative to ImageMagick.
- Avram file validations (
validate_file_size_of,validate_file_mime_type_of) extracted from the Avram PR. - API docs link in the README.
- Variant files are cleaned up when the stored file is deleted.
- ImageMagick
thumbnailcommand compatibility.
- Uploaders with pluggable storage keys, custom locations, and metadata
extraction (
filename,mime_type,sizeby default). - Two-stage upload workflow: cache first, promote later.
- Processor system with
variant,original, andprocess domacros. Variants run in parallel via fibers. - ImageMagick processor (
Latch::Processor::Magick). - Avram integration (
Latch::Avram::Model) withattachmacro for models and SaveOperations, including automatic caching, promotion, cleanup, and inline or background processing support. - Framework-agnostic design via the
Latch::UploadedFileinterface. Built-in Lucky support, adaptable to Kemal or any other Crystal framework. - Storage backends: FileSystem, S3 (with presigned URLs), and Memory.
- Metadata extractors:
FilenameFromIO,MimeFromIO,SizeFromIO,MimeFromExtension,MimeFromFile,DimensionsFromMagick. - Custom extractors via the
Latch::Extractorinterface. - StoredFile with JSON serialization (Shrine-compatible format), downloading, streaming, and variant accessors.
StoredFile#processshortcut forUploader.process(stored).- Compile-time validation of processor options with helpful error messages.
- Lucky removed as a hard dependency (optional via
require "latch/lucky/uploaded_file").