Introduction
gallery-dl is a Python-based command-line program that downloads image galleries and collections from a wide range of websites. It supports over 100 sites including social media platforms, image hosting services, and art communities, providing a unified interface for bulk media retrieval.
What gallery-dl Does
- Downloads images, videos, and metadata from 100+ supported websites
- Supports authentication for sites requiring login credentials
- Applies customizable filename templates and directory structures
- Filters downloads by date, file type, tag, or rating
- Integrates with yt-dlp for embedded video extraction
Architecture Overview
gallery-dl is written in Python and operates as a single-process CLI tool. Each supported site has a dedicated extractor module that handles URL parsing, API communication, and pagination. Downloads pass through a configurable pipeline that applies filename formatting, metadata extraction, and optional post-processing steps. Configuration is managed via a hierarchical JSON config file.
Self-Hosting & Configuration
- Install via pip, pipx, or your system package manager
- Configuration lives in
~/.config/gallery-dl/config.json - Set per-site credentials using the
usernameandpasswordfields or browser cookie import - Customize output paths with replacement fields like
{category},{title},{id} - Use
--filterexpressions to skip files by size, dimensions, or tags
Key Features
- Covers a broad range of sites: Pixiv, Twitter/X, Reddit, DeviantArt, Danbooru, Tumblr, and many more
- Writes metadata to JSON sidecar files for archival workflows
- Supports resuming interrupted downloads with an archive database
- Provides rate limiting and retry logic to avoid bans
- Extensible via custom extractors and post-processors
Comparison with Similar Tools
- yt-dlp — focused on video sites; gallery-dl covers image boards and galleries that yt-dlp does not
- wget/curl — generic HTTP downloaders without site-specific parsing or pagination
- Hydrus Network — a full media management application; gallery-dl is a lightweight CLI downloader
- Imgbrd-Grabber — GUI-based booru downloader; gallery-dl is terminal-first and supports more site types
FAQ
Q: How do I download from a site that requires login?
A: Add your credentials to the config file under the site's extractor section, or use --cookies-from-browser to import session cookies.
Q: Can gallery-dl skip files I have already downloaded?
A: Yes. Enable the archive database with --download-archive and gallery-dl will track completed URLs.
Q: Does it support proxy or VPN connections?
A: Yes. Set the proxy option in the config or pass --proxy on the command line.
Q: Is gallery-dl actively maintained? A: Yes. The project receives regular updates adding new extractors and fixing site changes.