Bulk Image Download
Bulk image download saves every selected picture in one action. Each file is written to your chosen subfolder with the name pattern applied, using the chrome.downloads API. No zip archive; zipping would need a bundled library.
Why it matters
You pick the images you want and click once. Each one saves as a real file you can open straight away, sorted by your pattern, with no archive to unpack. Nothing leaves your device except the image requests you trigger, and the extension needs no host permissions to do it.
The zero-dependency approach keeps Scalpel Images lightweight and auditable. No bundled zip library means no supply chain to vet, no bloat in the download, and no attack surface to worry about.
How it works
Bulk image download uses the chrome.downloads API to send each image to the browser's default download folder. You select the images you want, set a subfolder (e.g. "product-photos") and a naming pattern (e.g. {name}-{width}x{height}.{ext}), then click Download.
Scalpel Images builds a queue of download requests and sends them sequentially with small concurrency limits (3-5 at a time). This politeness keeps target servers happy. The popup shows a progress bar: "Downloaded 5 of 42" updates as each file lands.
Each file is given its own chrome.downloads.download() call with:
- The image URL or data URI
- The full path including subfolder and renamed filename
conflictAction: "uniquify"to avoid overwriting existing files
What does not matter
A zip archive is not always better. Zipping dozens of images takes time, creates an extra file, and requires you to unzip before viewing anything. Sequential downloads to a folder let you start using files immediately. If you need an archive later, your operating system's built-in compression is free and instant.
The extension also doesn't batch-validate images before downloading. It sends each request as queued and reports the results. If an image fails (404, timeout, CORS issue), that one is marked failed; the rest continue. No all-or-nothing lock-step.
And file naming conflicts are resolved automatically. If photo.jpg exists, the next one becomes photo (1).jpg. You don't have to babysit conflict dialogs.
Code example
// How Scalpel Images queues bulk downloads
async function bulkDownloadImages(images, subfolder, filenamePattern) {
const downloadQueue = [];
for (let i = 0; i < images.length; i++) {
const img = images[i];
// Apply the filename pattern (replace tokens)
const filename = applyPattern(filenamePattern, {
name: img.filename,
ext: img.extension,
index: String(i + 1).padStart(3, '0'),
width: img.naturalWidth,
height: img.naturalHeight,
format: img.format,
host: new URL(img.url).hostname
});
const filepath = `${subfolder}/${filename}`;
downloadQueue.push(
chrome.downloads.download({
url: img.url,
filename: filepath,
conflictAction: 'uniquify'
})
);
}
// Queue with concurrency limit (5 at a time)
const concurrency = 5;
for (let i = 0; i < downloadQueue.length; i += concurrency) {
await Promise.all(downloadQueue.slice(i, i + concurrency));
}
}
How Scalpel Images shows it
Open Scalpel Images on any page. Click to select the images you want (or "Select all"). In the footer, set a subfolder name (e.g. "gallery") and a filename pattern (e.g. {name}-{width}x{height}.{ext}). The preview shows you what the first file will be named. Click Download. A progress bar tracks the queue. When it says "Done", all files are in your Downloads folder, sorted and renamed.