Compress Image before save to database

Is there a way of reducing image size before saving to the database without using any dependance

What do you mean? Most good image processing tools are written in C/C++ so you’ll need a library or tools like ImageMagick, inevitably.

Hello, could client-side resizing be an option? (in javascript)

I would just use something like: GitHub - route/mogrify: Image processing in Elixir (ImageMagick command line wrapper)
With: System — Elixir v1.11.3

There are ways of doing it using a managed external process like but that fails when the files are too big: