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
- My cloud functions failing 3 days ago (P...
Hi, My cloud function using python has been failing for 3 days, I didn't push any new deployments... Its something to do with it not recognising the entrypoi...
- Scheduled works locking the entire Maria...
I have a scheduled function and apparently that or something is locking the entire MariaDB database and Appwrite is giving MariaDB errors. This error persists e...
- Python Function not working
I am getting this issue as well. Doesnt look like there was a solution as you guys were not able to replicate. Below is my code as well as the error. I started...