Image optimization/proxy after upload #4942
-
Hi, I'm running Pocketbase as the backend of a webshop system and I would like to optimize the images which cannot be optimized, as they're not stored locally. I would like to build a feature for my case and possibly share it with the community. I'd like to run an image proxy on my VPS and serve them for my frontend. Where should I take a look at to implement an usage of image proxy/optimiziation after uploading images via Pocketbase? Kind regards, |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Are you going to write the image optimization part into the Pocketbase's binary or JS's hook or are you going to call some kind of backend and only need the link of the images on Cloudflare R2? |
Beta Was this translation helpful? Give feedback.
-
Oh wow, that would be a huge advantage for me already. Thank you very much! |
Beta Was this translation helpful? Give feedback.
@furkankarayel What you’re describing is already available in Pocketbase. See documentation: https://pocketbase.io/docs/files-handling/#file-url
Regarding S3 vs your VPS. Inside Pocketbase, S3 is treated as another filesystem so that you don’t need to worry where files are actually stored