# Image Info Checker: Dimensions, Format & Size from URLs (`data-done-right/image-info-checker`) Actor

Check images in bulk from URLs: width, height, format, file size, animated flag, transparency and EXIF orientation, read from the first bytes only (no full download). Optional min-size and format rules. Direct image links only; no page crawling, no pixel analysis.

- **URL**: https://apify.com/data-done-right/image-info-checker.md
- **Developed by:** [Data Done Right](https://apify.com/data-done-right) (community)
- **Categories:** Developer tools, Automation, Other
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.80 / 1,000 image checkeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Image Info Checker: Dimensions, Format & Size from URLs

Use this **image info checker** to **get the dimensions, format and file size of images from a list of URLs without downloading them**. It asks each server for only the first bytes of the file (an HTTP Range request), reads the image header, and returns one row per image: width, height, real format, file size in bytes, animated or not, transparency and EXIF orientation. Add optional rules (minimum width and height, maximum file size, allowed formats) and every row gets a `passes` flag, so you can filter a list before you download, convert or publish it.

**What it does NOT do (read this first)**

- It takes **direct links to image files**, not web pages. It does not find images on a page (use "Download Images from URLs: Bulk Image & File Downloader" for that). A page URL is reported as failed with that reason.
- It reads **headers only**. It does not decode pixels, so it cannot tell you about blur, brightness, faces, duplicates, text or content, and it cannot confirm that the whole file is intact (a truncated JPEG with a good header still reports its size).
- It does not download, store or convert the images. There are no download links in the output.
- Animation is detected for GIF, WebP, APNG and AVIF. When the answer is not in the first bytes it says `animated: null` instead of guessing. Animated HEIC is not detected.
- It honours the host's **robots.txt** (a disallowed URL is skipped), does not log in, use proxies or work around hotlink protection. A 401, 403 or 429 from the host is reported as failed.
- The file size comes from the server's `Content-Range` or `Content-Length`. If the server sends neither and the file is bigger than the read limit, `fileBytes` is `null`.

### What you get

- One dataset row per URL: `format`, `width`, `height`, `displayWidth` / `displayHeight` (after EXIF rotation), `orientation`, `aspectRatio`, `megapixels`, `fileBytes`, `animated`, `hasAlpha`, `colorSpace`, `exifOrientation`, `contentType`, `mimeMismatch`, `lastModified`, `bytesRead`, `status`, `error`.
- With rules set: `passes` (true or false) and `filterFailures` (the reasons).
- A `SUMMARY` record with totals and a `FAILED` record listing every failed URL and why.

### What can this image checker do

- **Real format from the bytes**, not from the file name or the server's Content-Type: JPEG, PNG, GIF, WebP, BMP, TIFF, ICO, AVIF, HEIC and SVG. `mimeMismatch` is `true` when the server labels a file as a different format than it is.
- **Pixel size and file size without a full download.** In our local runs a 224 KB PNG needed about 12 KB, a 18 KB JPEG about 2 KB and a 1 MB animated GIF about 58 KB (the second frame proves it is animated); the rest was never requested. If a server ignores Range requests, the connection is closed after the read limit.
- **EXIF orientation**: phone photos often store 4000 x 3000 with a "rotate 90" flag. `displayWidth` and `displayHeight` show what a browser shows.
- **Animated and transparent images** flagged, so you can skip animated GIFs or keep PNG logos.
- **Rules**: `minWidth`, `minHeight`, `maxFileSizeMb`, `allowedFormats`, `rejectAnimated`.
- **Safe with bad input**: one bad URL never stops the run. Private, loopback and cloud-metadata addresses are refused. Requests to one host are spaced out and limited to 4 at a time.

### How to get image dimensions from a list of URLs

1. Paste the image links in **Image URLs**, one per line.
2. Run it. Each row has `width`, `height`, `format` and `fileBytes`.
3. Download the dataset as CSV, Excel or JSON.

### How to check image file size without downloading the image

`fileBytes` comes from the server's `Content-Range` header (when it honours the Range request, `rangeRequestsSupported` is `true`) or from `Content-Length`. `fileSizeSource` says which. Set `maxFileSizeMb` to get `passes: false` for files over the limit.

### How to filter images by minimum size before you download them

Set `minWidth` and `minHeight` (in displayed pixels), optionally `allowedFormats` (for example `jpeg`, `png`, `webp`) and `rejectAnimated`. Then keep the rows with `passes: true` and pass those URLs to your downloader. Every image is still charged once it was read, whether it passes or not.

### How to find animated GIFs and mislabelled image files

Look at `animated` (true for animated GIF, WebP, APNG, AVIF) and `mimeMismatch` (true when Content-Type and real format disagree). `format` is always the real format.

### Input example

```json
{
  "urls": [
    "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png",
    "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
    "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"
  ],
  "minWidth": 400,
  "maxFileSizeMb": 5
}
```

### Output example

Real row from a local run (rows are shortened to the main fields; the full row has all fields listed above, unused ones are `null`):

```json
{
  "index": 1,
  "sourceUrl": "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png",
  "status": "ok",
  "format": "png",
  "mimeType": "image/png",
  "contentType": "image/png",
  "mimeMismatch": false,
  "width": 800,
  "height": 600,
  "displayWidth": 800,
  "displayHeight": 600,
  "orientation": "landscape",
  "aspectRatio": 1.333,
  "megapixels": 0.48,
  "fileBytes": 224566,
  "fileSizeSource": "content-range",
  "animated": false,
  "hasAlpha": true,
  "colorSpace": "rgb",
  "rangeRequestsSupported": true,
  "bytesRead": 12588,
  "passes": true,
  "filterFailures": []
}
```

### Input reference

| Field | Default | Meaning |
|---|---|---|
| `urls` | prefilled samples | Direct image URLs, one per line (required). |
| `minWidth`, `minHeight` | 0 (no rule) | Displayed size below this gives `passes: false`. |
| `maxFileSizeMb` | 0 (no rule) | Files larger than this (1 MB = 1,000,000 bytes) give `passes: false`. |
| `allowedFormats` | empty (any) | jpeg, png, gif, webp, bmp, tiff, ico, avif, heic, svg. |
| `rejectAnimated` | false | Animated (or not provably still) images give `passes: false`. |
| `maxImages` | 1000 | Cap on checked URLs (max 20,000). Extra URLs are skipped and not charged. |
| `maxReadKb` | 512 | Most bytes read per image (16 to 8192). |
| `concurrency` | 10 | Images checked in parallel (1 to 32). |
| `timeoutSecs` | 30 | Give up on one image after this long. |

### How much does it cost

**$0.001 per image read** ($1 per 1,000 images). No start fee. An image that fails (404, not an image, blocked by robots.txt, forbidden) or is skipped (duplicate, over `maxImages`) is free.

- 1,000 images: $1.00
- 10,000 images: $10.00
- 100,000 images: $100.00 (run it as several runs of up to 20,000 URLs)

Platform compute for these runs is small, because each image costs a few KB of traffic and a fraction of a second.

### Use cases

1. **Pre-flight before a bulk download**: skip thumbnails and oversized files before running "Download Images from URLs: Bulk Image & File Downloader".
2. **E-commerce catalog checks**: find product images below a marketplace's minimum size, or in the wrong format.
3. **SEO and page-weight audits**: list the heaviest images and which are PNG where WebP would be smaller.
4. **Dataset cleaning for AI/ML**: drop tiny, animated or CMYK images from a URL list before training or captioning.
5. **Link and content QA**: find images that 404, redirect, or are served with the wrong Content-Type.

### FAQ

**Does it download the image?** No. It requests the first bytes only (up to `maxReadKb`) and closes the connection. Servers that ignore Range requests are cut off the same way, though some may still send a little more before the connection closes.

**Why is `fileBytes` null for some images?** The server sent neither Content-Range nor Content-Length and the file is bigger than the read limit. The format and size in pixels are still reported.

**Why did an image fail with "size was not found in the first N KB"?** The header is further into the file than `maxReadKb` (large embedded previews, some TIFFs). Raise `maxReadKb`.

**Can it check images behind a login or on Instagram?** No. It does not log in and does not work around blocks. Use only image URLs you may request.

**Is `width` the real pixel size?** It is the size stored in the file. For JPEGs with an EXIF rotation of 5 to 8, `displayWidth` and `displayHeight` are swapped to match what is displayed. For SVG it is the declared size, not pixels.

**Are the results always right?** Format, size and animation come straight from the file header, so they are exact when present. It does not validate the pixel data, so a damaged file with a valid header is still reported.

### Use with the Apify API / MCP / n8n / Make

Python:

```python
from apify_client import ApifyClient
client = ApifyClient("<APIFY_TOKEN>")
run = client.actor("<your-username>/image-info-checker").call(run_input={
    "urls": ["https://example.com/a.jpg", "https://example.com/b.png"],
    "minWidth": 800,
})
for row in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(row["sourceUrl"], row["width"], row["height"], row["fileBytes"], row["passes"])
```

JavaScript:

```js
import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: '<APIFY_TOKEN>' });
const run = await client.actor('<your-username>/image-info-checker').call({
  urls: ['https://example.com/a.jpg', 'https://example.com/b.png'],
  allowedFormats: ['jpeg', 'png', 'webp'],
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
```

The same input works in n8n, Make and the Apify MCP server (call the Actor by name and read its dataset).

### Related tools

- Download Images from URLs: Bulk Image & File Downloader
- Batch Image Converter & Resizer: WebP, AVIF, PNG & JPEG
- Image Compressor & Resizer: Compress Images in Bulk
- Image to Text OCR: Screenshots, Scans & Photos in Bulk

# Actor input Schema

## `urls` (type: `array`):

Direct links to image files, one per line. JPEG, PNG, GIF, WebP, BMP, TIFF, ICO, AVIF, HEIC and SVG are read. Example: https://example.com/photo.jpg. Web pages are not crawled for images. Use only URLs you may request.

## `minWidth` (type: `integer`):

Sets passes=false for images narrower than this, measured as displayed (after EXIF rotation). 0 means no rule. Example: 800. Every image is still reported and charged either way.

## `minHeight` (type: `integer`):

Sets passes=false for images shorter than this. 0 means no rule. Example: 600.

## `maxFileSizeMb` (type: `number`):

Sets passes=false for files larger than this many megabytes (1 MB = 1,000,000 bytes). Needs the file size, which most servers report; if unknown, passes=false with a reason. 0 means no rule. Example: 5.

## `allowedFormats` (type: `array`):

Only these formats pass. Values: jpeg, png, gif, webp, bmp, tiff, ico, avif, heic, svg. Empty means any format. Example: jpeg, png, webp.

## `rejectAnimated` (type: `boolean`):

Sets passes=false for animated GIF, WebP, APNG and AVIF images, and for images where animation could not be ruled out within the read limit.

## `maxImages` (type: `integer`):

Cap on how many URLs are checked (the rest are skipped and not charged). Also caps your cost. Example: 1000.

## `maxReadKb` (type: `integer`):

Upper limit on the first bytes read from each file. Most images are decided in under 20 KB; large animated GIFs, some TIFFs and JPEGs with big embedded previews may need more. Example: 512.

## `concurrency` (type: `integer`):

How many images are checked at once. Requests to one host are also spaced out and limited to 4 at a time. Example: 10.

## `timeoutSecs` (type: `integer`):

Give up on an image after this long. Example: 30.

## Actor input object example

```json
{
  "urls": [
    "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png",
    "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
    "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"
  ],
  "minWidth": 0,
  "minHeight": 0,
  "maxFileSizeMb": 0,
  "rejectAnimated": false,
  "maxImages": 1000,
  "maxReadKb": 512,
  "concurrency": 10,
  "timeoutSecs": 30
}
```

# Actor output Schema

## `results` (type: `string`):

All result items of this run (the default dataset), as JSON, CSV, Excel and more.

## `records` (type: `string`):

Key-value store records: the run summary, notes on any problems, and any files.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "urls": [
        "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png",
        "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
        "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("data-done-right/image-info-checker").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "urls": [
        "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png",
        "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
        "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("data-done-right/image-info-checker").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://upload.wikimedia.org/wikipedia/commons/4/47/PNG_transparency_demonstration_1.png",
    "https://interactive-examples.mdn.mozilla.net/media/cc0-images/grapefruit-slice-332-332.jpg",
    "https://upload.wikimedia.org/wikipedia/commons/2/2c/Rotating_earth_%28large%29.gif"
  ]
}' |
apify call data-done-right/image-info-checker --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,data-done-right/image-info-checker"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/R6zEwW5INyYr8hYBw/builds/h4ibkCQjvzUbVTAOZ/openapi.json
