devmahmoudmustafa/laravel-imagekit
Added return_keys configuration option to customize what data is returned after saving an image.
Available Keys:
name - Image filenamepath - Directory pathfull_path - Full path (path + name)size - Final file size in KB (after all modifications)original_size - Original file size in KB (before modifications)url - Full URL to the imageextension - File extension (jpg, png, webp, etc.)mime_type - MIME type (image/jpeg, image/png, etc.)width - Image width in pixelsheight - Image height in pixelsdisk - Storage disk namehash - MD5 hash of the filecreated_at - Timestamp when savedBehavior:
string (or appropriate type)array['name'] (backward compatible)Example:
// config/imagekit.php
'return_keys' => ['name', 'size', 'original_size', 'url'],
// Result:
[
'name' => 'image_123.jpg',
'size' => 45.50, // KB after compression
'original_size' => 150.25, // KB before compression
'url' => 'http://example.com/storage/...'
]
save() and saveImage() now return string|array based on configsaveGallery() now includes return keys data in resultsRelease Status: Stable
Version: 1.0.0
This is the first official public release of ImageKit, a Laravel package for advanced and fluent image processing.
ImageSavingImageSavedImageDeletedHow can I help you explore Laravel packages today?