You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 26, 2026. It is now read-only.
Hi, I was testing to upload and resize WEBP images with the thumb property, the file upload is working fine, but the resize is not working I was checking the code probably this is the issue, it's just taking these formats and not WEBP.
Unfortunately It's not just the file extension that is missing.
Webp is not supported at the moment because the image library that we use, disintegration/imaging, doesn't support webp (mostly due to the lack of native go webp encoding - golang/go#45121; most webp go packages seems to rely on libwebp which requires cgo and I want to avoid that).
There are workarounds, like decoding the uploaded image and converting it to jpg/png thumb, but for now this remains out of the scope for v1.0.
Reacted by Mauricio Siu, Fredy Sandoval, Kay, M. Gschwandtner, Renato Fontes and Miklós Galicz
@KnockOutEZ I'm open for suggestions but please first outline some of your planned implementation details to avoid investing unnecessary time and efforts in something that may not get merged.
@ganigeorgiev, I have a suggestion regarding adding WebP support. We can still utilize the disintegration/imaging, library, but with a slight adjustment. We can incorporate another library to convert WebP images to JPEG format, then proceed with imaging to generate thumbnail blobs. Subsequently, we can use this webp library to convert the thumbnail blobs back to WebP format and save them.
If you're okay with this approach, I'm ready to dive into the coding process!
Old issues cleanup: I'm closing this because I'm not planning working on it. I've briefly checked the suggested https://git.sr.ht/~jackmordaunt/go-libwebp but it comes with too high maintanence/dependency cost I want to avoid it. The currently supported thumb image formats are listed in the documentation. If someone want to work on it, feel free to link your PoC and I may reconsider it.
Activity
[-]Thumb not working with WEBP format[/-][+]Files: Thumb not working with WEBP format[/+]ganigeorgiev commentedon Oct 23, 2022
Unfortunately It's not just the file extension that is missing.
Webp is not supported at the moment because the image library that we use, disintegration/imaging, doesn't support webp (mostly due to the lack of native go webp encoding - golang/go#45121; most webp go packages seems to rely on
libwebpwhich requires cgo and I want to avoid that).There are workarounds, like decoding the uploaded image and converting it to jpg/png thumb, but for now this remains out of the scope for v1.0.
KnockOutEZ commentedon Apr 15, 2023
@ganigeorgiev can I look into this and try to solve this without cgo?
ganigeorgiev commentedon Apr 15, 2023
@KnockOutEZ I'm open for suggestions but please first outline some of your planned implementation details to avoid investing unnecessary time and efforts in something that may not get merged.
Wikidepia commentedon Jan 8, 2024
I stumbled upon this issue, just want to add that there are CGo-free webp encoder/decoder: https://git.sr.ht/~jackmordaunt/go-libwebp :)
laszlo1337 commentedon Mar 8, 2024
ganigeorgiev commentedon Mar 8, 2024
aalokkamble commentedon Mar 14, 2024
@ganigeorgiev, I have a suggestion regarding adding WebP support. We can still utilize the disintegration/imaging, library, but with a slight adjustment. We can incorporate another library to convert WebP images to JPEG format, then proceed with imaging to generate thumbnail blobs. Subsequently, we can use this webp library to convert the thumbnail blobs back to WebP format and save them.
If you're okay with this approach, I'm ready to dive into the coding process!
ganigeorgiev commentedon Mar 14, 2024
@aalokkamble Feel free to create a POC implementation but I'm not interested on working on this for the moment.
Note that your custom implementation doesn't necessary need to be part of the core repo and can be implemented to some extend as a "plugin"/library by attaching to the OnFileDownloadRequest hook (see example "plugins" in https://github.com/pocketbase/pocketbase/tree/master/plugins).
ganigeorgiev commentedon Nov 26, 2024
Old issues cleanup: I'm closing this because I'm not planning working on it. I've briefly checked the suggested https://git.sr.ht/~jackmordaunt/go-libwebp but it comes with too high maintanence/dependency cost I want to avoid it. The currently supported thumb image formats are listed in the documentation. If someone want to work on it, feel free to link your PoC and I may reconsider it.
ganigeorgiev commentedon Apr 20, 2025
Just for info: partial WebP thumbs support was enabled as part of #6744 (thumbs for now are stored as PNG).