A command-line tool written in Rust to extract and download all images from a webpage or local HTML file.
- Extract image links from URL or local HTML file
- Multi-threaded parallel downloading
- Proxy support (HTTP/HTTPS/Global)
- Customizable User-Agent
- Automatic home directory path expansion (supports
~) - Progress display and error handling
-
Ensure you have Rust toolchain installed
-
Clone repository:
git clone https://github.com/your-repo/image-downloader.git cd image-downloader -
Build and install:
cargo install --path .
Download prebuilt binaries from Releases page for your platform.
image-downloader [OPTIONS]| Option | Short | Description |
|---|---|---|
| --url | -u | Target webpage URL |
| --html | -H | Local HTML file path |
| --dir | -d | Output directory (default: ./img) |
| --user-agent | -a | Custom User-Agent |
| --proxy | -p | proxy address |
| --aria2c_proxy | aria2c apply proxy |
-
Download images from webpage:
image-downloader -u https://example.com -d ~/images -
Download from local HTML file:
image-downloader -H page.html -d ./downloads
-
Use proxy :
image-downloader -u https://example.com -p socks5://127.0.0.1:1080
-
Custom User-Agent:
image-downloader -u https://example.com -a "My Custom User Agent"
-
aria2c (for actual downloading)
-
Supported image formats: jpg, png, gif, webp (case insensitive)
Issues and Pull Requests are welcome