daun / statamic-asset-thumbnails
Generate asset thumbnails for exotic file formats like videos, raw photos, audio files and documents
Installs: 32
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 1
Type:statamic-addon
pkg:composer/daun/statamic-asset-thumbnails
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.8
- laravel/framework: ^12.0
- statamic/cms: ^6.0
Requires (Dev)
- cloudconvert/cloudconvert-laravel: ^1.1
- larastan/larastan: ^2.9 || ^3.0
- laravel/pint: ^1.14
- mockery/mockery: ^1.6
- orchestra/testbench: ^9.0 || ^10.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- spatie/ray: ^1.42
- transloadit/php-sdk: ^3.2
Suggests
- transloadit/php-sdk: Required to generate thumbnails using Transloadit
This package is auto-updated.
Last update: 2026-02-14 14:05:47 UTC
README
Generate asset thumbnails for exotic file formats like videos, raw photos, audio files and documents.
How It Works
The addon generates control panel thumbnails for non-image files by integrating with a third-party file conversion service and caching the resulting image preview. Currently it supports the following service. Support for CloudConvert is planned.
- Transloadit: 9$/month, free tier available
Quick Start
- Install using
composer require daun/statamic-asset-thumbnails - Configure the driver and credentials in
config/statamic/asset-thumbnails.php - Any supported files will automatically get a thumbnail in the control panel
- Recommended: set up a custom cache disk for faster thumbnail loading (see below for details)
File Formats
The Transloadit driver supports the following file formats:
- Image: tiff, bmp
- Video: mp4, mov, avi, mkv, webm, wmv
- Audio: mp3, aac, aif, m4a, off, opus, flac, wav
- Raw Photo: raw, dng, heic, heif, nef, nrw, cr2, cr3, crw
- Document: pdf, doc, docx, ppt, pptx, xls, xlsx, rtf, txt
- Adobe: psd, ai, eps
Commands
You can clear the thumbnail cache using the following command:
php please thumbnails:clear
Cache Disk
The default setup streams cached thumbnails from a custom controller. This simplifies initial setup,
but comes with some overhead. To make thumbnails load faster, you can define a custom disk inside
your app's public folder. Thumbnails can then be served directly from a public url, circumventing
Laravel entirely.
First, define a new disk in config/filesystems.php.
'disks' => [ + 'thumbnails' => [ + 'driver' => 'local', + 'root' => storage_path('app/public/thumbnails'), + 'url' => env('APP_URL').'/storage/thumbnails', + 'visibility' => 'public', + ], ],
Then, update the cache disk in config/statamic/asset-thumbnails.php.
'cache' => [ - 'disk' => null, + 'disk' => 'thumbnails', ],
License
This addon is paid software with an open-source codebase. To use it in production, you'll need to buy a license from the Statamic Marketplace.