Gallery Archiver is a Brave/Chromium extension for saving dynamic gallery pages as a single .mhtml archive. It was built for Civitai model and gallery pages, including pages that use infinite scrolling, lazy-loaded images, videos, and layouts that do not save correctly with the browser's native MHTML save.
Supported sites:
https://civitai.com/*https://civitai.red/*
The extension can autoscroll through galleries, preserve images that would otherwise be unloaded by the page, prepare Civitai layouts for reliable MHTML capture, and open the browser save dialog with a clean archive filename.
- Saves the current page as a single
.mhtmlarchive. - Preserves dynamically loaded Civitai gallery images before they are unloaded by the page.
- Handles many Civitai model pages whose native Brave/Chrome MHTML output has broken columns, overlapping sections, or off-screen galleries.
- Converts gallery videos into still image snapshots where possible, with a visible play badge.
- Opens the save dialog from the page context so Brave/Chromium can reuse the last-used save folder.
- Supports one-click save, start-and-save, and save-all-tabs workflows.
- Provides configurable filenames, timestamps, autoscroll timing, capture limits, and keyboard shortcuts.
- Open Brave or another Chromium browser.
- Go to
brave://extensions/orchrome://extensions/. - Enable Developer mode.
- Click Load unpacked.
- Select this repository folder,
GalleryArchiver/. - Pin the extension if you want quick access to the popup.
The extension requests access only to civitai.com and civitai.red.
- Open a Civitai or Civitai Red page.
- Wait for the visible content you care about to load.
- Click the extension icon.
- Click Save as MHTML, or press
Alt+2. - Choose where to save the
.mhtmlfile.
This is the best workflow for model pages where the visible page is already fully loaded.
- Open a gallery page.
- Set Max items in the popup if needed.
- Click Start, or press
Alt+1. - Let the page autoscroll while the extension collects gallery images.
- Click Stop if you want to stop before the limit.
- Click Save as MHTML.
The live counters show how much has been seen and captured.
Click Start and Save, or press Alt+3.
This starts the capture process and automatically saves when the configured item limit is reached.
Click Save all tabs, or press Alt+4.
The extension attempts to save supported HTTP/HTTPS tabs in the current window. Tabs without the needed host permission are skipped.
| Control | Default Shortcut | Description |
|---|---|---|
| Start | Alt+1 |
Starts autoscroll capture on the active page. |
| Save as MHTML | Alt+2 |
Prepares the active page and saves it as .mhtml. |
| Start and Save | Alt+3 |
Starts capture and saves automatically after the item limit is reached. |
| Save all tabs | Alt+4 |
Saves supported tabs in the current browser window. |
| Reset | none | Stops capture, resets page state, reloads the tab, and reloads the extension. |
| Stop | none | Stops the current capture/autoscroll run. |
| Options | none | Opens the extension options page. |
- Seen: gallery items the scanner has encountered.
- Captured: images successfully preserved for the archive.
- Deduped: unique gallery detail URLs seen.
- Total: total image URLs currently known for the archive.
- Progress bar: current captured count relative to Max items.
Max items controls the capture limit for autoscroll workflows. The default is 200.
Higher values can produce very large MHTML files and longer save times.
Open the options page from the popup with Options.
The options page shows and attempts to update shortcuts for:
- Start
- Save
- Start and Save
- Save all tabs
If your browser does not apply shortcut changes from the options page, manage them through:
- Brave:
brave://extensions/shortcuts - Chrome:
chrome://extensions/shortcuts
- Scroll delay (ms): delay between autoscroll steps. Default:
300. - Stability timeout (ms): how long an image/card should remain stable before capture. Default:
400.
Use larger values if a page is loading slowly or images are being captured before high-resolution versions appear.
Filename base options:
- browser tab title
- website URL
- domain name only
- custom text
Timestamp options:
- no timestamp
YYYYMMDD_HHMMSSYYYYMMDD_HHMMYYYYMMDDYYYY-MM-DD_HHMMSSYYYY-MM-DD
Filenames are sanitized for Windows by removing characters that are not allowed in file names.
The extension uses chrome.pageCapture.saveAsMHTML() to capture the page. Before capture, the content script prepares the page so the saved archive is more stable than the native browser MHTML output.
Preparation includes:
- freezing or replacing gallery videos with still images where possible
- applying Civitai-specific layout fixes for model pages
- making sticky and dynamic layout regions archive-friendly
- hiding broken image reaction overlays that render as repeated digit strings in MHTML
- settling the page briefly before capture
After capture, the popup sends the MHTML blob back into the page and triggers a hidden <a download> from the page context. This better matches Brave/Chromium's native save behavior and usually opens the save dialog in the browser's last-used folder.
If in-page saving fails, the extension falls back to the downloads API.
- Very large galleries can produce very large
.mhtmlfiles. - Some remote video frames may not be capturable because of browser security and CORS rules.
- Browser MHTML support is imperfect. The extension includes active fixes for known Civitai layout failures, but future Civitai layout/class changes may require updates.
- Saving all tabs depends on browser permission state. Unsupported URLs and tabs without permission are skipped.
- If the browser setting "Ask where to save each file" is disabled, the browser may save directly instead of opening a Save dialog.
Use Start first and allow the extension to autoscroll through the gallery before saving. Increase Max items if needed.
Increase Scroll delay and Stability timeout in Options, then reload the page and try again.
Make sure the browser is configured to ask where to save files. The extension tries to preserve Brave/Chromium's last-used folder behavior, but final folder selection is controlled by the browser.
Check the browser shortcut page:
brave://extensions/shortcutschrome://extensions/shortcuts
Shortcut conflicts with other extensions or browser commands can prevent activation.
Try reloading the page, waiting for visible content to settle, then saving again. If the issue persists, keep the bad MHTML and screenshots for debugging. The project status notes in docs/project_status.md describe the known fixed layout issue and useful comparison pages.
Install dependencies:
npm installRun tests:
npm test -- --runInBandThe test suite uses jsdom. Some canvas/media APIs are not implemented in jsdom, so warnings may appear during tests; the important result is whether the suites pass.
Useful project docs:
docs/project_status.md: current Civitai MHTML layout fix status and historydocs/gallery_archiver_save_flow_design_notes.md: save-flow design notes and guardrailsdocs/PRD.md: product requirements notes
Current extension version in manifest.json: 1.1.
The major Civitai MHTML layout fix is merged to main in commit:
0d83f89fb4ec827351341386f7ce00682cd6ced7