# img2dataset

> img2dataset downloads image URL lists into datasets for AI training. It skips images sent with X-Robots-Tag noai headers, and it does not read robots.txt.

Canonical: https://promptlyfound.com/crawlers/img2dataset
Updated: 2026-11-22

## Short answer

img2dataset is an open source tool that turns lists of image URLs into datasets for AI training. **img2dataset does not read robots.txt, so the opt-out that works is an X-Robots-Tag header such as noai on the image response.** By default it skips images with those headers. Each operator can turn the check off, and the default user agent does not name the tool.

## Key findings

- By default img2dataset skips images whose response has the header X-Robots-Tag: noai, noindex, noimageai or noimageindex. [1]
- An operator can turn the header check off with --disallowed_header_directives '[]'. [1]
- The README documents no robots.txt support, and the download code fetches each image URL without a robots.txt check. [2]
- The default user agent is a Firefox string. If the operator sets user_agent_token, the tool adds that token and a link to the img2dataset repository. [2]
- LAION's FAQ suggests img2dataset to download the images that LAION's URL datasets point to. [3]

## What blocking it does

A robots.txt rule does not reach img2dataset. The tool downloads a list of image URLs that someone already collected. It does not crawl a site to find them. [The img2dataset README](https://github.com/rom1504/img2dataset) documents no robots.txt support, and [the download code](https://github.com/rom1504/img2dataset/blob/main/img2dataset/downloader.py) fetches each image URL without a robots.txt check.[2] [LAION's FAQ](https://laion.ai/faq/) suggests img2dataset to download the images that LAION's URL datasets point to.[3]

The opt-out that works is a response header. The README says img2dataset skips images whose response has the header `X-Robots-Tag: noai`, `noindex`, `noimageai` or `noimageindex`. It says the opt-out lets creators keep their art out of indexing and training.[1] An operator can turn the check off with `--disallowed_header_directives '[]'`.[1] The header protects only images downloaded after you add it.

## robots.txt rules

img2dataset does not read robots.txt. Third-party lists show this rule, but the tool ignores it:

```
User-agent: img2dataset
Disallow: /
```

Send the opt-out on your image responses instead. For example, in the HTTP response headers:

```
X-Robots-Tag: noai, noimageai
```

## Verify a request

You cannot verify an img2dataset request. The default user agent in the code is "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0", which does not name the tool.[2] If the operator sets user_agent_token, img2dataset adds that token and a link to its GitHub repository to the string.[2] img2dataset is not a service, so there is no IP list.

## Sources

1. img2dataset README. img2dataset on GitHub. https://github.com/rom1504/img2dataset
2. downloader.py. img2dataset on GitHub. https://github.com/rom1504/img2dataset/blob/main/img2dataset/downloader.py
3. FAQ. LAION. https://laion.ai/faq/

---

This is a plain-text copy of https://promptlyfound.com/crawlers/img2dataset from Promptly Found. The web page is the canonical version and includes the charts.
