GoogleChromeLabs / squoosh

Make images smaller using best-in-class codecs, right in the browser.
https://squoosh.app
Apache License 2.0
22.05k stars 1.56k forks source link

Bulk image upload & processing #1406

Open chraebsli opened 8 months ago

chraebsli commented 8 months ago

Is your feature request related to a problem? Please describe. I often have to compress & resize lots of files with the same compression settings. This takes lots of time when I have to drag every image individually, click on import saved settings, wait a moment, download, repeat.

Describe the solution you'd like I'd be happy if you could upload multiple files at a time, which then be resized & compressed with the same setting and download them as a ZIP archive or so

Does other service/app have this feature? I regularly use CompressPNG and its other tools like JPG2PNG for bulks, but they don't support resizing & compression settings.

Additional context -

chraebsli commented 8 months ago

& Thanks for the app, I really like it! I hope it gets more features soon!

LarsFlieger commented 2 months ago

This is definitely possible with good speeds. This websites does it: https://clevercompress.com/en

https://github.com/user-attachments/assets/ed0a92d4-7166-48c7-b83f-78bb6b1355c7

With web workers and threads you can achieve quite good speeds at several images.

chraebsli commented 2 months ago

Thanks for the recommendation, but that's no what I was looking for. There are a lot of smart and great compressors out there, like the one I mentioned.

But none of these have the features Squoosh has:

LarsFlieger commented 2 months ago

Thanks for the recommendation, but that's no what I was looking for. There are a lot of smart and great compressors out there, like the one I mentioned.

But none of these have the features Squoosh has:

  • custom resize and compression settings
  • local processing
  • see differences in real time

I understand. The tool I shared performs local processing, and I'm confident there are tools that offer local compression and settings for resizing and compression.

However, it’s true that most tools offering bulk processing lack features like difference display or similar functionalities. Perhaps we should suggest adding these features to them.

edvinPL commented 1 month ago

I love this tool. Recommended it to many people. It beats solutions like Caesium. Only issue is it lacks bulk processing...

Khongchai commented 1 month ago

I made a fork of squoosh that adds batch processing.

https://squoosh-multiple-export.vercel.app/

Hope this is useful to some

chraebsli commented 1 month ago

squoosh-multiple-export.vercel.app

Great work @Khongchai, Thanks! Here some feedback & bugs I discovered:


That would be the links to the code and PR:

Khongchai commented 1 month ago

@chraebsli Thanks for the feedback! I noticed that the randomUUID problem happens only when you're using microsoft edge (I tested on Arc, Firefox and Edge, maybe chrome has this issue as well). Anyway one of my todo items is to try to zip everything in memory and download as one .gz file.

I'll copy some of your comments to the PR. I kind of like keeping all todos in one place.

chraebsli commented 1 month ago

I'll copy some of your comments to the PR. I kind of like keeping all todos in one place.

Yeah haven't seen the PR feedback at first, only searched for the link.

Arvin-xc commented 1 month ago

Hi there, I made some minor modifications based on squoosh to support bulk compression

image

You can modify the compression configuration before compressing. Here is the App deployed on vercel: https://bulk-squoosh.vercel.app/

Hope this helps.