Skip to content
//Image Resizer & Converter example\\

Social media sizes (JPEG)

A 1200x630 link preview, a 1080x1080 post and a 400 px thumbnail from each photo, each under 150 KB.

Updated November 12, 2026

What this example returns

The dataset’s “Files” view shows 14 columns: Preview, File, Format, Width, Height, Bytes, Saved %, Size, Source, Source format, Source width, Source height, Source bytes, and Error. See every output field.

What each setting does

The input this example runs Image Resizer & Converter with. “Try this input” opens it in the console, where you can run it as-is or change any field first.

Image URLs imageUrls

https://upload.wikimedia.org/wikipedia/commons/9/9a/Gull_portrait_ca_usa.jpg, https://upload.wikimedia.org/wikipedia/commons/1/1a/24701-nature-natural-beauty.jpg

Direct links to the images, one per line: JPEG, PNG, WebP, GIF (animated too), AVIF, HEIC/HEIF, TIFF, BMP or ICO, up to 100 MB each. Google Drive, Dropbox and GitHub share links are turned into download links automatically. Each image gives one file per output size. You can also (or instead) take images from a…

Fit fit

Cover (fill the box, crop)

How the image fits a box when both width and height are set. Inside: keep proportions, fit within the box (no cropping). Cover: fill the box exactly and crop what sticks out. Contain: fit within the box and pad the rest with the background colour. Fill: stretch to the exact size.

Default: Inside (keep proportions, no crop) → this example uses Cover (fill the box, crop)

Output format format

JPEG

File format of the results. WebP and AVIF give the smallest files, JPEG opens everywhere, PNG is lossless with transparency. 'Same as source' keeps each image's own format (HEIC becomes JPEG).

Default: WebP → this example uses JPEG

Quality quality

85

Compression quality from 1 to 100 for JPEG, WebP and AVIF. 75 to 85 keeps photos looking the same at a fraction of the size. PNG, GIF, TIFF and BMP are lossless and ignore it.

Default: 82 → this example uses 85

Several output sizes sizes

1200x630, 1080x1080, 400

Make several files from each image in one run, one per line: '1200x630' (box, uses Fit), '400' (width), 'x300' (height) or '50%' (scale). When set, Width and Height above are ignored. Each size is its own file and its own result row.

Crop and pad position cropPosition

Top

Which part of the image to keep when 'Cover' crops, and where the image sits when 'Contain' pads.

Default: Center → this example uses Top

Maximum file size (KB) targetSizeKb

150

Optional. Keep each file under this size: the quality is lowered first (JPEG, WebP, AVIF), PNG is reduced to 256 colours, and only then the pixel size is reduced. The 'targetSizeMet' column says whether it fit.

Remove metadata stripMetadata

No

Remove EXIF (camera, GPS location, date) and colour-profile data for smaller, privacy-safe files. Photos are always turned upright first. Turn off to keep EXIF and the colour profile.

Default: Yes → this example uses No

.json
{
  "imageUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/9/9a/Gull_portrait_ca_usa.jpg",
    "https://upload.wikimedia.org/wikipedia/commons/1/1a/24701-nature-natural-beauty.jpg"
  ],
  "sizes": [
    "1200x630",
    "1080x1080",
    "400"
  ],
  "fit": "cover",
  "cropPosition": "top",
  "format": "jpeg",
  "quality": 85,
  "targetSizeKb": 150,
  "stripMetadata": false
}

What it costs

You pay for the events the actor reports, such as each result or page it produces. Platform usage is included in the event prices: compute, proxies, browser and storage cost nothing extra.

  • Image up to 500 KB$0.0017One resized or converted file made from a source image of up to 500 KB.
  • Image 10 to 25 MB$0.0102One resized or converted file made from a source image of 10 to 25 MB.
  • Image 2 to 10 MB$0.00425One resized or converted file made from a source image of 2 to 10 MB.
  • Image 500 KB to 2 MB$0.00255One resized or converted file made from a source image of 500 KB to 2 MB.
  • Image 25 to 50 MB$0.02125One resized or converted file made from a source image of 25 to 50 MB.
  • Image 50 to 100 MB$0.051One resized or converted file made from a source image of 50 to 100 MB.

Full pricing

When to use this example

From the Image Resizer & Converter readme:

Why is a file bigger than the original?

Converting an already small, compressed image (for example a JPEG to PNG, or lossless WebP) can make it larger. savedPercent is then negative. Use WebP or AVIF with a quality around 80, or set a maximum file size.

How long do the download links work?

Each fileUrl and the ZIP link open without an account for 7 days. The files stay in your storage for as long as your plan keeps run results.

Other ways to run Image Resizer & Converter

All examples of Image Resizer & Converter

About Image Resizer & Converter

Resize, crop, convert and compress images in bulk from links, datasets or uploaded files: WebP, AVIF, JPEG, PNG, GIF, TIFF, BMP and ICO, HEIC input, several sizes per image, target file size, EXIF removal and animated GIF/WebP. One row per file with a download link, plus a ZIP of all files.

Price:
$1.70 / 1,000 results
Developer:
Echofield

Image Resizer & Converter pageOutput fieldsPricing

Related actors

//From the blog\\

Latest articles

All articles

The internet is full of data.
Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

No credit card. No setup calls.