Tampermonkey · Chrome ✦ Smart Download Free v2.5.8

IMGLAB
Instagram Downloader PRO

Download any Instagram photo or video with a single keypress — from your feed, profile dialog, or standalone post page. Full carousel support, per-image download tracking with visual state indicators, 10 remappable keyboard shortcuts, and persistent history that remembers exactly which slides you’ve already saved.

Tampermonkey Per-Image Tracking 4-State Button Auto-Upgrade Logic GM_setValue Storage
10
Keyboard
shortcuts
4
Button states
per image
3
View contexts
feed · dialog · post
∞
Download history
zero expiry
Live on every post — updates as you navigate carousel slides
Never touched
White / black download arrow — default theme color
Other images saved
Purple arrow — post has history, but not this slide
This image saved
Yellow checkmark — exactly this slide was downloaded
All images done
Green checkmark — entire post fully downloaded
Per-Image Intelligence

The button always tells you the truth about the slide you’re on

Navigate a 10-image carousel and the button updates after every slide transition — no page reload, no manual check. Download image 3, skip to image 7, come back to image 3 days later — it still shows yellow. The script remembers every index.

  • ✓ Button refreshes 200ms after each carousel navigation
  • ✓ Purple arrow = silent warning — something was saved here before
  • ✓ Auto-upgrades to green when all indices are covered individually
  • ✓ Single-image posts go straight to green — no yellow intermediate
  • ✓ Works in home feed, profile dialog, and standalone post pages
  • ✓ State persists across browser restarts via GM_setValue
⌨️ IMGLAB Keyboard Shortcuts ✕
Click a key cell to reassign it, then press any single key. Numpad keys are fixed and cannot be changed.
ActionLetter keyNumpad (fixed)
Next postCNumpad2
Previous postENumpad8
Like postLNumpad1
Save/bookmark postSNumpad3
Open profile / Go homeQNumpad7
ActionLetter keyNumpad (fixed)
Next imageFNumpad6
Previous imageANumpad4
Follow userXNumpad5
Download current imageDNum.
Download all imagesZNumpad0
Fully Remappable

Every key reassignable from the Tampermonkey menu

Open the settings panel from the Tampermonkey extension menu. Click any key badge, press the new key, and save. Numpad keys are fixed reference — letter keys are yours to remap. Conflicts highlight red, Instagram reserved-key warnings show amber.

D + Num.
Download current image
Downloads only the visible carousel slide. Yellow checkmark appears, resets after 1.5s, then re-evaluates true state.
Z + Numpad0
Download all images
Downloads every carousel image in one operation. Permanent green checkmark — whole post is done.
  • ✓ Settings open instantly from Tampermonkey menu
  • ✓ Live duplicate detection — red badge + disabled Save
  • ✓ Reset to defaults button restores original layout
  • ✓ All handlers suppressed while settings panel is open
Per-Index Tracking

Knows exactly which images you’ve saved — across all posts

Each post is stored as a single compact entry. A comma-separated list of downloaded image indices — or a single "A" when everything is covered. At ~20 bytes per post, it scales comfortably past 100,000 entries in GM storage.

  • ✓ "A" — all images downloaded (permanent green)
  • ✓ "0,2" — images 1 and 3 only (yellow on those, purple on others)
  • ✓ Auto-upgrades to "A" when all indices are individually covered
  • ✓ Keyboard settings stored separately under versioned key
  • ✓ Version key bump discards stale data cleanly on schema change
GM Storage — imglab_posts_downloaded_v2
{
“DWgx3H1CZOP”: “A” ← all images done
“DWk2T5UEr4l”: “0” ← image 1 only
“DWjHp1Jk79Y”: “0,2,4” ← images 1, 3 & 5
“DWBlK8ggT8w”: “A” ← auto-upgraded
}
“A” = green checkmark on all slides
“0,2” = yellow on slides 1 & 3, purple elsewhere
🖼️
Carousel-Aware Single Download

Press D (or Num.) and only the currently visible slide downloads — not the whole carousel. Reads the active dot indicator (div._acnb with 2 CSS classes) to determine the exact index, then fetches only that image URL via the Info API.

⌨️
10 Remappable Keyboard Shortcuts

Navigate posts, like, save, follow, open profiles, and download — all from the keyboard. Every letter key is configurable from the Tampermonkey menu settings panel. Capture phase registration ensures shortcuts fire before Instagram’s own handlers.

🔄
Live Button Refresh on Navigation

Every carousel navigation — via F/A keys, Numpad6/4, or clicking the next/prev buttons — triggers a 200ms delayed refreshDownloadBtnState() call. The button is always accurate for the image you’re currently viewing.

🎯
Auto-Upgrade to Green

After each single-image download, markImageDownloaded() fetches the total carousel count from the Info API and checks if every index is now covered. If so, the storage entry upgrades to "A" instantly and the button turns green.

🌐
Multi-Context Keyboard Handling

Three independent keydown handler blocks cover every Instagram view: home feed, profile dialog (detected by SVG rotation), and standalone post page. Download handlers call the correct function per context — no double-firing, no missed keys.

🛡️
Scroll Anchor Fix

Injects overflow-anchor: none globally at startup, eliminating the browser’s scroll snapback bug when pressing C to navigate posts. Instagram’s lazy-loading React DOM insertions no longer fight programmatic scrollIntoView.

Download Pipeline — From Keypress to File
1
Key captured in capture phase

keyDownHandler fires before Instagram’s own listeners. Context is detected — home feed (location.href === 'https://www.instagram.com/'), profile dialog (SVG rotation presence), or standalone post (/p/ path). The correct handler branch runs for the current view.

↓
2
Current carousel index read from DOM

For D/Num. (single download), getCurrentCarouselIndex() scans div._acnb elements — the dots below the carousel. The one with exactly 2 CSS classes is the active slide. Its index becomes the mediaIndex passed to the Info API.

↓
3
URL resolved via Info API

postGetUrl(btn, articleNode) calls getUrlFromInfoApi(articleNode, mediaIndex) — fetching /api/v1/media/{mediaId}/info/ and extracting exactly the right carousel_media[mediaIndex] URL. Response is cached in infoCache for subsequent navigations.

↓
4
File downloaded and history updated

downloadResource(url, filename) fetches with CORS mode, creates a blob URL, and triggers a hidden <a download> click. Then markImageDownloaded(postId, mediaIndex, articleNode) saves the index to GM storage and checks for auto-upgrade to "A".

🚀 Up and Running in Under a Minute
1
Install Tampermonkey

Add the Tampermonkey extension to Chrome from the Chrome Web Store. It’s the most widely used userscript manager — free, open source, and actively maintained.

2
Install the script

Open Tampermonkey’s dashboard, create a new script, and paste the IMGLAB Instagram Downloader PRO source. Save and enable. The script activates on all instagram.com/* pages immediately.

3
Open Instagram and start downloading

Navigate to any post. Press D to download the current image, Z to download all. Press F / A to navigate carousel slides and watch the button update in real time.

4
Customise keyboard shortcuts

Open the Tampermonkey extension menu and click ⚙️ Keyboard Shortcuts. Click any key badge to reassign it. Changes take effect immediately — no page reload required.

FREE · TAMPERMONKEY · INSTAGRAM

Support IMGLAB Instagram Downloader

Every feature — per-image carousel tracking, auto-upgrade logic, the four-state button system, scroll anchor fix, multi-context keyboard handlers — took real debugging time against Instagram’s constantly-changing DOM. Your donation funds continued development and maintenance.

🎯
Keeping up with Instagram’s frequent DOM, class name, and API changes
⚡
New features: story bulk download, reel support, highlight archiving
🌱
Long-term: companion downloader app with folder organisation and history sync

One-time · Any amount · No subscription · No sign-up

Built with ❤️ by IMGLAB
Ko-fi  ·  Buy Me a Coffee  ·  support@imglab.net