Compress Image before save to database

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

1 Like

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:

3 Likes

Since this thread is revived, we should mention the awesome new libraries image | Hex and vix | Hex

3 Likes