You can actually use the Appwrite storage service π
It provides image resizing
Wait, really?
We do have basic image manipulation
Requires these for alpine:
sudo apk add tiff-dev jpeg-dev openjpeg-dev zlib-dev freetype-dev lcms2-dev \
libwebp-dev tcl-dev tk-dev harfbuzz-dev fribidi-dev libimagequant-dev \
libxcb-dev libpng-dev
ya, but the odd thing is the build worked fine
Unfortunately that isn't something we can do right now, but we're talking about it internally I think
π€ Hmmm
It's only JPEG that needs some of these external dependencies
So instead of using getFileDownload i have to use getFilePreview passing the required size? What are the downsides? What If I have images bigger than 10MB?
There shouldn't be many if it's under 10MB. If it's over 10MB, it will be more of an issue, but rarely do you get JPGs larger than 10MB.
Maybe you can try a different runtime like Java?
Python is weird because C-Python uses so many system packages.
π€£ And all the image/video manipulation packages are just C-Python wrappers, basically
@Steven Should we consider distributing a heavier python runtime, or allow them to install other dependencies?
[SOLVED] Cloud Function breaks when resizing jpg image
Is this something that Matej is still thinking about?
I am a big Python user, and I think it's one of those quirks of Python we need to be aware of, which is the heavy reliance on lots of linux packages
ya i think we plan to add customizable build steps in the future
Is the resized image cached? Or does it have to resize it every time I use it?
yes, it is cached
Awsome
Recommended threads
- [v1.8.1] Getting error "(role: applicati...
... but that scope doesn't exist. I am trying to get a function to run and modify tables in the database dynamically. I set everything up and eventually got: ...
- Scheduled function silently stopped firi...
Function is scheduled `* * * * *` and is `enabled: true`, but Appwrite Cloud has stopped queueing executions. Last execution: **2026-05-30 00:47 UTC** (~46h...
- Unable to create Sites or Functions with...
Heya, I was looking at the appwrite documentation for Sites API with the server api: https://appwrite.io/docs/references/cloud/server-nodejs/sites I canβt fin...