Yeah @iamkarshe
that's right, that's where the magic starts. And it's interesting to hear that it has been implemented somewhere else. If you've worked in this domain then is there anything you can suggest to make this better ?? It'd help.
I will share my use case see if any point you can pick up.
We have Python script which mostly runs via cron — it takes original media ref. from database.
Make three versions of original images, <image>_low.jpg, <image>_sd.jpg & <image>_hd.jpg using various parameters in PIL optimize &quality factor. Also we reduce width & height for creating low-resolution images.
Later, we do add some copyright text (this is client-dependent feature).
Send images again to S3 where it is serving to app/web via Cloudfront.
Lately we exposed API via Flask for client blogs & eCom where on-the fly media are now being compressed & stored.
Update
We are now started to use .webp for newer compression.
Now to your original question,
You can definitely make it as web-api-like-app so developer can use it for batch compression/processing.
User can apply filters via same API, for example grayscale image with 60% quality and 400 x 300 can be on the fly requested as pixxia-app.io/<image-uuid>?filter=gray&quality=60&width=400&height=300.
Nice, we somehow use the same PIL/Pillow at our eCom cronjob for compression.
Magic starts at
settings.py
line number49
.github.com/dhhruv/Pixxia/blob/6d9e...
Yeah @iamkarshe that's right, that's where the magic starts. And it's interesting to hear that it has been implemented somewhere else. If you've worked in this domain then is there anything you can suggest to make this better ?? It'd help.
I will share my use case see if any point you can pick up.
Python script
which mostly runs viacron
— it takes original media ref. from database.<image>_low.jpg
,<image>_sd.jpg
&<image>_hd.jpg
using various parameters in PILoptimize
&quality
factor. Also we reducewidth
&height
for creating low-resolution images.S3
where it is serving to app/web viaCloudfront
.API
viaFlask
for client blogs & eCom where on-the fly media are now being compressed & stored.Update
.webp
for newer compression.Now to your original question,
web-api-like-app
so developer can use it for batch compression/processing.pixxia-app.io/<image-uuid>?filter=gray&quality=60&width=400&height=300
.Let me know your thoughts.
Many powers.
Yeah, I've seen some engines like that. May work but still a lot of work has to be done from what you answered. Might wanna look into that. Thanks.