Customizer

Layout style type

Dark and light theme type

Navigation menu type

Online Image Compression Tool — Batch compress all images in a folder (preserve directory structure) | Support JPG PNG SVG GIF WEBP

Free online image compression tool, supports uploading compressed ZIP files, allows multi-level folder selection, compresses only when necessary, and preserves the original directory structure. The backend is based on leading industry compression tools such as Java SpringBoot, Thumbnailator, TwelveMonkeys, pngquant, cwebp, gifsicle, and SVGO, ensuring compression quality and efficiency. It supports threshold/quality adjustment and overwrite options, making it suitable for website optimization, photographers, and e-commerce batch image processing.

Creative Inspiration

Many users, when working with project folders (such as product libraries, portfolios, and website assets), often need to compress all images at once. While most online tools on the market support batch compression, they often only work for images within a single folder. This significantly reduces efficiency as the number of folders increases. Our online batch compression tool precisely addresses this pain point: you can directly upload an entire compressed package containing images and other files. The system automatically identifies and batch compresses the images, leaving non-image files intact and preserving the directory structure. Users can also flexibly select images for compression and set parameters such as the compression ratio, making the image optimization process more efficient, secure, and convenient.

How to Use

  1. Open the page, click Select Compressed File (ZIP), and select the compressed package you exported for your project (a single ZIP file ≤ 80MB).

  2. After uploading, the page will automatically parse and display the directory as a folder tree (all images are selected by default). You can expand/collapse folders and uncheck images that do not need to be compressed.

  3. Set batch compression parameters:

    • Quality slider: Drag to adjust the compression ratio (default 50%); lower quality results in smaller files.

    • Size threshold: Only compress images larger than X KB (e.g., 50KB). Small images remain unchanged.

    • Overwrite original file names (checked by default): Select whether to replace file names. Unchecking this will generate new file names for the compressed images in the output package.

    • Compress File Type: Select the file type to compress. Unchecked file types will not be compressed.

  4. Click Start Compression and Download: A real-time traffic bar animation will display the compression progress. When the traffic bar is loaded, the compressed file will be automatically downloaded, generating a compressed_result.zip file with the original directory structure.

  5. To start over, click Reset to clear the settings and delete the temporarily uploaded content.

Application Scenarios

  • Website Administrators/Front-End Engineers: Quickly compress images across the entire site before deployment to improve page loading speed.

  • E-commerce operators: Process an entire set of product images (organized by category folders) at once, saving manual operation time.

  • Designers/Photographers: Batch compress and deliver proofs by project folder, preserving the directory structure while reducing file size.

  • Content editors/media teams: Batch compress images for articles, saving storage costs and bandwidth.

  • General users: Organize family/travel photos and compress them to reduce file size before backing up or transferring them.

How it works

This online batch image compression tool is developed based on the Spring Boot architecture and integrates multiple mainstream image optimization technologies, including open source components such as Thumbnails, Cwebp, pngquant, gifsicle, and SVGO. After a user uploads a compressed file containing images, the system automatically analyzes the folder structure and performs batch optimization on only the image files (JPG, PNG, GIF, SVG, and WebP formats), leaving non-image files unchanged. This entire process is performed in a secure server environment, and all temporary data is immediately cleared upon completion, ensuring compression effectiveness while also safeguarding data security and privacy.

FAQ

  1. Q: If I see __MACOSX or .DS_Store after uploading, will they be retained?

    A: No. macOS system files (__MACOSX, .DS_Store) are automatically filtered out and do not appear in the final download package.

  2. Q: Why do some images become larger after compression?

    A: If the source image is already highly compressed or some PNGs contain a large number of colors, the compression algorithm may not be able to reduce the size further, or may even slightly increase it. The tool will fall back to the original file if this is uneconomical, ensuring no forced changes in image quality. We recommend lowering the quality parameters or using the "Compress large images only" setting.

  3. Q: Are there any size or file limits for uploaded ZIPs?

    A: Yes. We recommend a single ZIP upload of no more than 80MB, with a maximum of 500 valid files per ZIP, and a maximum of 20MB per file. These limits are to ensure stable processing and responsiveness.

  4. Q: If my ZIP contains non-image files (such as .exe or .doc files), will they be compressed or included?

    A: The tool only compresses image formats (jpg/png/webp/svg/gif). Other file types are retained by default or ignored depending on the settings. For security reasons, we recommend not uploading compressed files containing executable files in public.

  5. Q: Why does the "Server Processing" message appear after the upload progress reaches 100%? How long do I have to wait?

    A: The progress is divided into two parts: the browser uploads the file (upload progress is displayed) → the server starts compressing (a pseudo-progress message "Server Processing" is displayed). Compression time depends on the number and size of images. A small number of images usually takes a few seconds, while a large batch or many large images may take tens of seconds. The page will automatically start downloading after compression is complete.

Trustworthy online tool website, loved by users all over the world!

Hi, Online Tools is a website that brings together a variety of practical online tools. No need to download, you can use it online anytime and anywhere to meet your work and study needs. We promise: 100% no collection of user data, 100% free to use.

free
Completely free
lock
Privacy first
ssl
Encrypted transmission