Image Compressor & Resizer: Compress Images in Bulk
Pricing
from $1.36 / 1,000 image compresseds
Image Compressor & Resizer: Compress Images in Bulk
Compress images in bulk: an image compressor and resizer API for lists of image URLs. Shrink JPG, PNG, WebP and AVIF, resize to a max width or height, strip EXIF, and get signed download links with the exact bytes saved.
Pricing
from $1.36 / 1,000 image compresseds
Rating
0.0
(0)
Developer
Data Done Right
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
Use this image compressor to compress images in bulk from a list of URLs. Paste direct image links, pick a quality, an output format and a maximum size, and get a smaller file for every image with a signed download link and the exact bytes saved. It is also an image resizer: shrink to a maximum width or height (never enlarged), or crop or pad to an exact size. No browser, no login, no API key.
Pay only for images that actually got smaller. If a file cannot be made smaller, you get the original back, reduced: false, and no charge.
What can this image compressor do
- Compress JPG, PNG, WebP, AVIF and GIF. Also reads BMP, TIFF and HEIC (iPhone photos). One dataset row per URL with the original and compressed size and
savedPercent. - Convert while compressing. Output
jpeg,webp,pngoravif, or keep each image's own format. - Resize images. Set
maxWidthand/ormaxHeightto fit inside a box. Small images are never enlarged. UseresizeModecover(crop to the exact size) orcontain(pad to the exact size). - Strip metadata. On by default: removes EXIF (camera model, GPS position) and other metadata. The EXIF orientation is applied to the pixels first, so photos are never turned sideways, and colors are converted to sRGB before the color profile is dropped.
- Smarter PNG. Lossless re-compression plus an optional 256-color palette (keeps transparency) when it is smaller. Turn on
losslessto never reduce colors. - Progressive JPEG (on by default), lossless WebP and AVIF when you ask for it.
- Safe with odd files. CMYK becomes RGB, transparency is replaced by white (or your color) when saving as JPEG, animated GIF and WebP keep their animation, and huge images (over 64 megapixels) are refused before they are decoded.
- Bulk and API-friendly. Up to 5,000 images per run, optional dataset input (the output of another Actor), one bad URL never stops the run.
How to compress images in bulk
- Paste direct image links in Image URLs (one per line), or pick a dataset that contains image URLs.
- Choose the Output format (try
webp), a Quality (75-85 is a good start) and, if you want, a Max width. - Run it. Each compressed file is stored in the run's key-value store. The dataset has a signed
urlfor it that works without an API token.
How to resize images in bulk
Set maxWidth (and/or maxHeight). With resizeMode: "fit" every image is scaled down to fit inside the box and keeps its shape. For thumbnails of exactly the same size use resizeMode: "cover" (crop from the center) or "contain" (add a background color), with both maxWidth and maxHeight set.
Input example
{"urls": ["https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png","https://picsum.photos/id/10/1200/800.jpg"],"outputFormat": "webp","quality": 80,"maxWidth": 800,"stripMetadata": true}
More examples:
{"outputFormat": "original", "quality": 75}: same formats, smaller files.{"maxWidth": 400, "maxHeight": 400, "resizeMode": "cover", "outputFormat": "jpeg"}: 400x400 thumbnails.{"lossless": true}: PNG and WebP without any color loss.{"datasetId": "<dataset id>", "datasetField": "imageUrl"}: compress the images found in a scraper's output.
Output
One dataset row per URL:
{"index": 2,"sourceUrl": "https://picsum.photos/id/10/1200/800.jpg","fileName": "10-1200-800.webp","url": "https://api.apify.com/v2/key-value-stores/<storeId>/records/10-1200-800-1f2e3d4c5b6a.webp?signature=...","originalBytes": 140884,"compressedBytes": 41210,"savedPercent": 70.8,"widthBefore": 1200,"heightBefore": 800,"widthAfter": 800,"heightAfter": 533,"format": "webp","reduced": true,"status": "compressed","error": null,"note": "converted jpg to webp; resized 1200x800 to 800x533"}
status:compressed(smaller, charged),unchanged(could not be made smaller, original returned, free),skipped(duplicate URL, maxImages, spending limit, SVG) orfailed(download error, not an image, too many pixels).errorsays why.urlis a signed link to the delivered file. Files are kept as long as the run's storage is kept.- The
SUMMARYrecord has the totals: images compressed, bytes saved, percent saved, charged images.
How much does it cost to compress images
Pay per event: $0.0017 per image that got smaller (event image-compressed, about $1.70 per 1,000 images), plus the normal Apify platform usage of the run, which is small for typical images. Images that stay the same size, failed downloads and skipped URLs are free. Set a maximum spending limit on your run and it stops cleanly when reached.
Use cases
- Speed up a website: compress and resize product photos and blog images to WebP.
- Cut storage and bandwidth for image libraries and CDNs.
- Prepare images for email, CMS uploads or marketplaces with a size limit.
- Shrink the images a scraper collected, straight from its dataset.
- Make thumbnails of one exact size.
Limits (honest)
- The Actor downloads public image URLs you have the right to use. It does not log in and does not work around hotlink protection: a 401, 403 or 429 from the host is reported as
failed. - Max 25 MB per file by default (up to 100 MB) and 64 megapixels per image. SVG (vector) files are skipped.
- Lossy compression changes pixels. For a visually identical result use quality 80 or higher, or
lossless. - Animated GIF and WebP keep their animation only when the output format is
originalorwebp. Animated AVIF is not supported. Other output formats keep the first frame and say so innote. - Not every file can shrink: already well-optimized images often come back as
unchanged.
FAQ
How do I compress images in bulk online without losing quality?
Use quality 80-85 with the original format, or turn on lossless. Savings are smaller, and files that cannot shrink are returned unchanged for free.
Which format gives the smallest images?
Usually AVIF, then WebP, then JPEG for photos. For graphics with flat colors, PNG with color reduction or lossless WebP is often smallest. Try the same URLs with outputFormat set to each and compare savedPercent.
Does it remove EXIF and GPS data?
Yes, by default (stripMetadata). Orientation is applied to the pixels first. Turn the option off to keep EXIF and the color profile.
Will it make small images bigger when resizing?
No. fit and cover never upscale. contain pads the canvas but does not enlarge the picture.
What happens to PNG transparency when I convert to JPEG?
JPEG has no transparency, so it is replaced by a solid color (white by default, set backgroundColor). Use WebP, AVIF or PNG to keep it.
Can I compress images from a dataset or a scraper's output?
Yes. Pick the dataset in datasetId and set datasetField to the field with the image URL (a text value or a list).
Related tools
- Image Downloader : download images from URLs or web pages in bulk, with dedupe and ZIP.
- Video Converter & Compressor : convert and shrink video files.
- PDF Compressor : reduce the size of PDF documents.