chladog / payload-webp

payloadcms/payload plugin for automatic image conversion to webp format.
https://www.npmjs.com/package/payload-webp
GNU General Public License v3.0
45 stars 5 forks source link

Not compatible with cloud storage #9

Closed ukasiu closed 1 year ago

ukasiu commented 1 year ago

When used with cloud storage plugin (https://github.com/payloadcms/plugin-cloud-storage) it errors with:

` payload-webp-plugin: Error while trying to read original file: XXX.png; ENOENT: no such file or directory, open '/home/node/dist/media/XXX/XXX.png'

chladog commented 1 year ago

If I understand correctly you are trying to regenerate webp while using cloud storage. I do not plan to support this feature as it's not part of Payload's core. However if you want to work on this feature, PR is welcome. The compression works with local files only so you would've to introduce a way of downloading the blobs from the external source beforehand and then uploading the processed ones afterwards.