[6.x] Asset video thumbnail generation
This PR adds the ability to automatically generate thumbnails for video assets within the Control Panel's asset browser.
Docs to come!
Closes https://github.com/statamic/ideas/issues/1120.
Nice! Would it be possible to merge the hook data into the asset resource after merging the thumbnail data? That would be a simple way of allowing what PR #10594 was trying to accomplish, just via hooks. With the current order, there's no way of setting a custom thumbnail value for other asset types (e.g. PDFs) since the thumbnails method always returns ['thumbnail' => null] for non-image/video types and overwrites whatever was returned from the hook. Switching the order and merging the hook data after the thumbnail data would make that possible.
https://github.com/statamic/cms/blob/a90c7d26ff3cac3004b09c5c49a304463c4d72fe/src/Http/Resources/CP/Assets/FolderAsset.php#L89-L90
Or maybe add another explicit thumbnail hook, if that makes more sense?
Nice! Would it be possible to merge the hook data into the asset resource after merging the thumbnail data? That would be a simple way of allowing what PR #10594 was trying to accomplish, just via hooks. With the current order, there's no way of setting a custom
thumbnailvalue for other asset types (e.g. PDFs) since thethumbnailsmethod always returns['thumbnail' => null]for non-image/video types and overwrites whatever was returned from the hook. Switching the order and merging the hook data after the thumbnail data would make that possible.https://github.com/statamic/cms/blob/a90c7d26ff3cac3004b09c5c49a304463c4d72fe/src/Http/Resources/CP/Assets/FolderAsset.php#L89-L90
Or maybe add another explicit thumbnail hook, if that makes more sense?
Love this! I've made an adjustment to how things are merged that will make it possible to override any thumbnail 🤘
Amazing! Can't wait for this to land 🎊
@JohnathonKoster is this ready for a review?
@jackmcdade yup! Would love someone to take a look