Closed lucyawrey closed 1 year ago
Support for external plugins is out of scope of this package for now due to lack of time.
However you can implement storing it to external storage similarly as it's implemented in @payloadcms/plugin-cloud-storage
with newly added hooks
feature in WebP Plugin Options.
Specifically the afterConversion
hook. The parameter contains resulting object including BufferObject of the file.
If you make such a hook in a generalised way I would be happy to merge it to this package as an extra utility that anyone could import and use :-)
Has anyone implemented this?
Automatic WebP creation on image upload would be very helpful for our project. When I attempt to use this plugin along with the official
@payloadcms/plugin-cloud-storage
plugin it silently fails. I get no errors, the webp file is not created, and the data looks like this:I would assume this is not a bug, but that this plugin is only designed to work with local image storage and not the cloud plugin. Is there a way I can make them work together, or is this something you plan to add support for? Thanks!