Image Converter: Resize, Compress, WebP and AVIF
Pricing
from $1.00 / 1,000 image produceds
Image Converter: Resize, Compress, WebP and AVIF
Convert, resize and compress images in bulk. JPEG, PNG, WebP, AVIF, GIF, TIFF and SVG in, WebP, AVIF, JPEG, PNG, GIF or TIFF out. Thumbnails and responsive sizes in one run, metadata stripped, EXIF rotation applied. Files land in the key-value store. Pay per produced file.
Pricing
from $1.00 / 1,000 image produceds
Rating
0.0
(0)
Developer
Markus Heiß
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Convert, resize and compress images in bulk. Give a list of image URLs or base64 data, pick an output format and a size, and get back one file per image in the run's key-value store plus one dataset row with the link, the new size and the bytes saved. Several sizes or formats per image in one run, for example thumbnails at 200, 800 and 1600 px as WebP.
Built for web performance work, e-commerce product images, CMS and newsletter pipelines, and automations in Make, Zapier or n8n that need a smaller or different image file. The conversion runs inside the Actor with sharp (libvips). No third-party image API, no browser.
What it does
- Converts JPEG, PNG, WebP, AVIF, GIF, TIFF and SVG to WebP, AVIF, JPEG, PNG, GIF (static) or TIFF. "Same as source" keeps the format and only resizes or recompresses.
- Resizes to a width, a height or both, with the fit modes
inside(no crop),cover(crop to fill),contain(pad),outsideandfill. Crop position by edge or by content (entropy,attention). Images are never enlarged unless you allow it. SVG files are rendered at the target size, so they stay sharp. - Compresses with a quality setting from 1 to 100, mozjpeg for JPEG, lossless WebP and AVIF for graphics, and an optional palette mode for PNG.
- Variants: up to 10 outputs per image in one run, each with its own label, size, format and quality.
- Cleans up: strips EXIF (camera, GPS location), XMP and color profiles by default, converts to sRGB and applies the EXIF orientation so photos stay upright.
- Background color for transparent areas in JPEG output, for the
containpadding and for the optional flatten. Optional grayscale. - Stores the files in the run's default key-value store and returns a direct link per file. Optional base64 in the row for files under 1 MB.
- Safe downloads: http and https only, private and local network addresses are blocked on every redirect, 25 MB size limit, download timeout, retries on HTTP 429 and 5xx. Web pages, videos and other non-image answers get a free error row.
Use cases
- Faster websites: turn JPEG and PNG product or blog images into WebP or AVIF and cut their size by 30 to 90 percent.
- Responsive images: produce 400, 800 and 1600 px versions of each image for
srcsetin one run. - Thumbnails: square 200 x 200 crops with smart crop (
attention) for catalogs, galleries and previews. - Marketplace and shop feeds: JPEG on a white background at a fixed size, metadata removed.
- Privacy: strip GPS and camera data from photos before you publish them.
- Automations: send base64 from a form or an email attachment, get the converted file back as a link or base64.
Input
| Field | Description | Default |
|---|---|---|
| Image URLs | Direct links to image files, also Apify key-value store record URLs | |
| Base64 images | JSON array like [{"name": "logo.png", "data": "iVBORw0..."}], data URIs work too | |
| Output format | webp, avif, jpeg, png, gif, tiff or original | webp |
| Width, Height | Target size in pixels, 1 to 10,000. Empty keeps the aspect ratio. | |
| Fit | inside, cover, contain, outside, fill | inside |
| Crop position | centre, edges and corners, entropy, attention | centre |
| Do not enlarge | Never upscale beyond the source size | on |
| Quality | 1 to 100 for WebP, AVIF, JPEG and palette PNG | 80 |
| Lossless (WebP, AVIF) | Encode without quality loss | off |
| Variants | JSON array of up to 10 outputs per image, fields as above plus label | |
| Strip metadata | Remove EXIF, XMP and color profile | on |
| Apply EXIF orientation | Rotate photos upright | on |
| Background color | Hex, rgb() or a name like white or transparent | #ffffff |
| Flatten transparency | Replace transparency with the background in every format | off |
| Grayscale | Black and white output | off |
| PNG with palette | Up to 256 colors, much smaller PNG files | off |
| Include base64 | Add the file as base64 to the row, files under 1 MB only | off |
| Max file size (MB) | Larger sources are skipped, 1 to 25 | 25 |
| Max concurrency | Images processed at the same time, 1 to 16 | 4 |
| Download timeout | Seconds per download, 5 to 300 | 60 |
Example, convert two images to WebP at most 1200 px wide:
{"images": ["https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/1280px-Fronalpstock_big.jpg","https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png"],"format": "webp","width": 1200,"quality": 80}
Example, three variants per image: a square smart-cropped thumbnail, a medium WebP and a large AVIF:
{"images": ["https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/1280px-Fronalpstock_big.jpg"],"variants": [{ "label": "thumb", "width": 200, "height": 200, "fit": "cover", "position": "attention" },{ "label": "medium", "width": 800 },{ "label": "large", "width": 1600, "format": "avif", "quality": 60 }]}
Output
One dataset row per produced file:
{"sourceUrl": "https://upload.wikimedia.org/wikipedia/commons/thumb/3/3f/Fronalpstock_big.jpg/1280px-Fronalpstock_big.jpg","sourceName": "Fronalpstock_big.jpg","variant": "thumb","format": "webp","contentType": "image/webp","width": 200,"height": 200,"bytes": 9690,"originalFormat": "jpeg","originalWidth": 1280,"originalHeight": 575,"originalBytes": 221419,"savingsPercent": 95.6,"fileUrl": "https://api.apify.com/v2/key-value-stores/aBcD1234/records/001-Fronalpstock_big-thumb.webp?signature=xYz123","key": "001-Fronalpstock_big-thumb.webp","base64": null,"note": null,"error": null}
fileUrlopens the file directly, without an API token. The signature in the link grants read access to this one file.keyis its name in the run's default key-value store: number of the source, file name, variant label and extension.variantis your label, or a generated one like800w-webpwhen you set none.originalWidthandoriginalHeightare the display size of the source after EXIF orientation.originalBytesis the size of the downloaded file.savingsPercentcompares the output with the source file. It is negative when the output is larger, which happens when you convert small or already well compressed files.sourceUrlis empty for base64 input,sourceNamethen holds your name.notetells you when an animated GIF or WebP was reduced to its first frame, or when base64 was left out because the file is 1 MB or larger.- A source that fails (download error, not an image, too large, refused platform) returns one row with
errorset and no charge. A variant that fails returns a row withvariantanderror.
Export the dataset as JSON, CSV or Excel, or read it through the Apify API.
Pricing
Pay per produced file: 0.001 USD per file, so 1.00 USD per 1,000 files. Three variants of one image are three files. Errors, refused links, non-image URLs and files over the limit are free. Set the maximum charge per run in Apify to cap the cost: the Actor stops before it produces a file that the limit cannot pay for.
Each run also has a start fee of 0.00005 USD per GB of memory, which Apify shows as Actor Start.
Limits
- At most 1,000 images per run and 10 variants per image. Extra images get one free error row.
- At most 25 MB and 100 megapixels per source image.
- HEIC/HEIF photos from iPhones, BMP, ICO, JPEG XL, PDF and RAW files are not supported.
- GIF output is a single frame. Animated GIF and WebP input is converted from the first frame.
- AVIF encoding is slower than WebP. Large AVIF variants of big photos can take a few seconds each.
- Only direct links to image files. Pages of video, social media and photo sharing platforms (YouTube, Instagram, TikTok, X, Facebook, Pinterest, Flickr, Imgur and the like) are refused.
- Base64 input counts toward the Apify input size limit of a few MB. Use URLs for large batches.
- The default 512 MB memory handles typical web images with 4 in parallel. Apify gives a run CPU in proportion to its memory, so very large photos are slow at 512 MB: a 46 megapixel JPEG converted to a full size WebP takes about a minute, resized to 1920 px a few seconds. For many photos above 30 megapixels, give the run 1 to 2 GB of memory or lower Max concurrency.
Data source, permitted use and legal
- Data source: The images you provide as links or base64. The Actor downloads each link once and converts it with the open source library sharp (libvips). Nothing is sent to a third-party service.
- Snapshot: Results show the source at the time of the run. We do not guarantee that they are complete, current or correct.
- For business use: This Actor is offered to businesses only, not to consumers.
- Permitted use: Convert only images you own or have the right to process. Respect the copyright and the terms of the sites you download from. Produced files are stored in your Apify account and follow its data retention.
- Your responsibility: You choose the images and decide what happens with the results. If your images contain personal data, for example faces or GPS data in EXIF, you are the controller and need your own legal basis. Metadata is stripped by default.
- No circumvention: The Actor uses plain HTTP downloads without login. It does not bypass paywalls, logins, rate limits, blocks or access restrictions, and refuses links to video and social media platforms.
- Request volume: One download per image, at most 16 at the same time, up to 3 attempts with backoff on HTTP 429 and 5xx. Do not use it to put excessive load on a server.
- Provider: forgeloop, Markus Heiss, Austria. Imprint, Privacy Notice, Terms of Use.
Questions and issues
Open an issue on the Actor page.