Image Converter & Compressor - WebP, AVIF, JPG, PNG in Bulk
Pricing
from $1.60 / 1,000 images
Image Converter & Compressor - WebP, AVIF, JPG, PNG in Bulk
Convert, compress and resize image links in bulk: WebP, AVIF, JPG, PNG. Strips EXIF and GPS data by default. Results are files in the run's key-value store with public links.
Pricing
from $1.60 / 1,000 images
Rating
0.0
(0)
Developer
Northbell
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
2 days ago
Last modified
Categories
Features
Share
Convert, compress and resize image links in bulk. Give it direct links to images (or a dataset from another Actor) and get WebP, AVIF, JPEG or PNG back as files with public links, one dataset row per image. EXIF and GPS data are removed by default. One bad image never fails the run: it becomes a row with a plain error message, and the rest carry on.
Try it now — the input is already filled in. Press Start. It converts two NASA photos (public domain: an Apollo 11 photograph and a Galileo image of the Earth and Moon, from images-assets.nasa.gov) to WebP at quality 80. In our own local run with this input: 384,920 bytes in, 298,252 bytes out (22.5% smaller), about 3 seconds including the downloads. Both outputs are under 25 megapixels, so they are billed as 2 images: $0.004 (plus $0.00005 for the run start).
What you pay
| Event | Price | When |
|---|---|---|
image | $0.002 | per converted image, output up to 25 megapixels |
large-image | $0.006 | per converted image, output above 25 megapixels |
apify-actor-start | $0.00005 | once per run |
- You are charged for an image only after the result is saved. Errors, rejected links, images skipped by "Only new images" and images that could not be converted are free.
- Set "Maximum total charge" on the run as your cap. The Actor checks the charge limit before it stores each image and stops cleanly when the next one does not fit.
Built so that runs finish
- A timeout on every image. Downloads give up after 20 seconds without data or 60 seconds in total; download plus conversion is cut off at 120 seconds. A hung server costs you one error row, not the run.
- Retries. A 429, a 5xx answer or a dropped connection is tried again twice (after 1 and 3 seconds, or the server's
Retry-Afterup to 10 seconds). A 404, a login page or a corrupt file is an error straight away. - Errors are rows. Each failed image gets
status: "error"and a sentence that says why (for example "The server answered 404." or "The file is damaged or not an image this tool can read"). The run still ends as succeeded. - Bounded parallelism. 4 images at a time by default, up to 8 (
concurrency). - Size caps. Inputs above
maxFileMb(50 MB by default) and images above 100 megapixels are refused before decoding.
Run it after your scraper
If another Actor collects image links (a product scraper, a real-estate scraper, a news scraper), this Actor can convert them automatically after every run of it:
- In Apify Console, open that Actor and go to Integrations.
- Add Run Actor (on "Run succeeded") and pick this Actor.
- Use an input like this, with the name of the field that holds the image link or links:
{"datasetId": "{{resource.defaultDatasetId}}","urlField": "images","format": "webp","quality": 80,"maxWidth": 1600,"onlyNewImages": true}
Each run of the first Actor then hands over its dataset, and every link in it is converted. The field can hold one link or a list of links (images holding an array is the usual product-scraper shape): every link in the list is converted. A dotted path such as media.photos reaches into nested fields, and a list of objects with a url field works too. If the dataset has no links, nothing runs and nothing is charged. Each output row keeps a small sourceItem (the field name, the link and the row's id if it has one) so you can match results to the original rows.
Run it on a schedule with only new images
Turn on onlyNewImages and schedule the run. The Actor keeps a list of what it has converted in a key-value store named image-converter-seen in your account, keyed by a hash of the link and the output settings. On the next run, links already converted with the same settings come back as status: "skipped" rows and are not charged; change the format, quality, size or any other output setting and the images are converted again. Images that were not processed (for example because of maxItems or a charge limit) are not marked as done, so the next run picks them up. The list is saved at the end of the run. If the store cannot be opened, the run stops before charging anything.
Formats and options
| Input | Default | What it does |
|---|---|---|
imageUrls | two NASA photos | direct links to images (JPEG, PNG, WebP, AVIF, GIF, TIFF) |
datasetId, urlField | - , url | read links from another Actor's dataset; dotted paths and lists allowed |
onlyNewImages | off | skip links already converted with the same settings |
format | webp | webp, avif, jpeg, png, or keep (same format as the input) |
quality | 80 | 1 to 100, for WebP, AVIF and JPEG; for PNG it sets the palette quality |
lossless | off | WebP and PNG only: exact pixels, larger files |
targetKb | none | find the highest quality that gives a file at or under this size (at most 6 tries) |
maxWidth, maxHeight | none | scale down to fit |
fit | inside | inside keeps the ratio; cover fills the box and crops; contain fits and pads (transparent, white for JPEG) |
withoutEnlargement | on | never scale a small image up |
keepMetadata | off | keep EXIF, GPS and camera data (off removes them) |
maxItems | 500 | images per run (links and dataset together) |
maxFileMb | 50 | largest input and largest result in MB (hard cap 200) |
concurrency | 4 | images at the same time, 1 to 8 |
Notes:
- Metadata. Orientation is always applied: a photo that a camera stored sideways comes out upright, and the orientation tag is not kept. With the default settings, EXIF, GPS location and camera data are removed. The colour is converted to sRGB.
- Transparency. WebP, AVIF and PNG keep it. JPEG has none, so transparent areas become white.
- PNG. With
losslessoff, PNG output is a palette image (up to 256 colours) at the chosen quality, which is much smaller for graphics and screenshots. Turnlosslesson for exact pixels. - Target size. With
targetKb, the Actor tries your quality first (a file that already fits is kept), then the lowest quality (if even that is too big, it stops and reportstargetReached: falsewith the smallest file), then searches in between. It never resizes; setmaxWidthtoo if you need a smaller file than quality alone can reach. For lossless output and GIF there is nothing to search: the row just says whether the file is under the target. - Animated WebP and GIF stay animated when the output is WebP or GIF. Other outputs use the first frame.
- HEIC/HEIF photos (iPhone) are not supported. The image library cannot decode HEVC, so these come back as an error row, free. AVIF input works. SVG input is refused too.
Output
One dataset row per input. The converted file is stored in the run's key-value store, and outputUrl is its public link.
{"inputUrl": "https://images-assets.nasa.gov/image/PIA00342/PIA00342~medium.jpg","status": "ok","error": null,"outputUrl": "https://api.apify.com/v2/key-value-stores/a097d3f8-5d45-4f91-859e-fc148d32c181/records/PIA00342-medium-34d12036.webp","outputKey": "PIA00342-medium-34d12036.webp","format": "webp","width": 1005,"height": 1280,"inputBytes": 122699,"outputBytes": 77590,"savedPercent": 36.8,"quality": 80}
This row is from our local run of the prefilled input; the store id in the link is the one that run used on our machine. On Apify it is your run's store. With targetKb set, rows also carry targetReached (true or false). For a failed input, status is error, error says why in plain words, and outputUrl is null. For a skipped one, status is skipped. The result files stay as long as your Apify storage retention keeps the run.
Limits
- Direct image links only. A link that returns a web page is an error (free). Links to private or local network addresses are rejected.
- The image must be reachable without a login. Some sites block automated downloads; those links come back as errors with the server's answer.
- Size caps:
maxFileMbfor the input and the result (50 MB by default, 200 MB at most), and 100 megapixels for the input. - Your images are processed only inside this Actor's run on Apify; nothing is sent to other services.
- You are responsible for having the right to convert the images you give it.
日本語
画像への直リンク(または他の Actor のデータセット)を、WebP・AVIF・JPEG・PNG に一括で変換・圧縮・リサイズします。結果は実行のキー・バリューストアに保存され、公開リンクが画像1枚につき1行のデータセットで返ります。EXIF・GPS 情報は既定で削除(向きは反映)。目標サイズ(KB)の指定、前回までに変換済みの画像をスキップする設定にも対応。料金は1枚 $0.002(出力 2,500 万画素以下)、2,500 万画素超は $0.006。保存できた分だけ課金され、失敗・スキップは無料です。1枚ごとにタイムアウトとリトライがあり、壊れた画像があっても実行全体は失敗しません。iPhone の HEIC/HEIF には対応していません。変換する画像の権利はご自身でご確認ください。