Image Converter: JPEG, PNG, WebP and AVIF, resize and compress avatar

Image Converter: JPEG, PNG, WebP and AVIF, resize and compress

Pricing

from $9.00 / 1,000 image converteds

Go to Apify Store
Image Converter: JPEG, PNG, WebP and AVIF, resize and compress

Image Converter: JPEG, PNG, WebP and AVIF, resize and compress

Converts every image URL you list to JPEG, PNG, WebP or AVIF, resizes by width, height or fit, compresses to the quality you set, and strips metadata. Returns a download link for each file.

Pricing

from $9.00 / 1,000 image converteds

Rating

0.0

(0)

Developer

Ed Rayyis

Ed Rayyis

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Give it a list of image URLs and it converts each one to WebP, AVIF, JPEG or PNG, resizes it, compresses it to the quality you set, and strips the metadata. Every new file goes into the run's key value store, and the dataset gives you a direct download link with the size before and after.

What it does

  • Converts to WebP, AVIF, JPEG or PNG, or keeps each image in its own format
  • Resizes by width, height or both, with four fits:
    • Inside: keeps the aspect ratio and fits within the box
    • Cover: fills the box and crops the overflow from the center
    • Contain: fits inside the box and pads to the exact size with your background color
    • Fill: stretches to the exact size
  • Never enlarges by default: an image smaller than the target keeps its own size. Turn this off to scale small images up.
  • Compresses JPEG, WebP and AVIF to a quality from 1 to 100. WebP also has a lossless mode, for logos, screenshots and line art.
  • Strips metadata by default: EXIF (including GPS coordinates), XMP and the color profile are removed. An image with a color profile other than sRGB, such as Display P3, is converted to sRGB first so its colors stay right.
  • Turns photos upright from their EXIF orientation before resizing, so portrait photos stay portrait.
  • Keeps transparency in PNG, WebP and AVIF. For JPEG, transparent areas are filled with the background color.

Reads JPEG, PNG, WebP, AVIF, TIFF and GIF. An animated GIF is converted from its first frame, and the item says so in note.

Example

A 550 by 368 JPEG of 44,891 bytes, converted to WebP at 400 pixels wide and quality 80, came out at 400 by 268 and 19,328 bytes: 56.9% smaller. A PNG of 224,566 bytes with transparency came out as a 152,822 byte lossless WebP with every pixel identical.

Input

  • Image URLs (required)
  • Output format: WebP (default), AVIF, JPEG, PNG, or same as the original (JPEG, PNG, WebP and AVIF stay as they are; any other format becomes PNG)
  • Width and height in pixels (optional; leave both empty to keep the size)
  • Fit: inside (default), cover, contain or fill. Cover, contain and fill need both width and height.
  • Never enlarge (default on)
  • Quality (default 80)
  • Lossless WebP (default off)
  • Strip metadata (default on). When off, EXIF (GPS included), XMP and the color profile are copied to the new file. IPTC blocks are not copied.
  • Background color (default white), a CSS color such as #ffffff or white
  • Maximum file size in MB (default 50): larger source files get an error item
  • Parallel images (default 4)

Output

Dataset: one item per URL with outputUrl (download link), outputKey (the file name in the key value store), inputFormat, outputFormat, inputWidth, inputHeight, outputWidth, outputHeight, inputBytes, outputBytes, savedPercent, metadataStripped, and convertedToSrgb when the image had a color profile. Files are named by their position in your list and the source file name, such as 0001-photo.webp.

A URL that cannot be converted gets ok: false and an error, such as HTTP 404, an unknown host, a file over the size limit, or "the file is not an image format this actor can read" for a web page. One bad URL never stops the run.

Pricing

Pay per event: one event per image converted. URLs that fail are not charged. The run stops when it reaches the maximum charge you set.

Scope and conduct

Only the URLs you supply are downloaded. The actor does not log in anywhere and uses no proxies. Convert images you have the right to use.

Support

Questions and problems: the Issues tab on this page. Replies are written by an AI assistant on behalf of the developer and reviewed by the developer.