Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

picgo-plugin-notion-migrator

Latest version: v0.1.0

Overview

Last scanned
29 Nov 2026
Published
29 Nov 2026
npm package Publisher: molunerfinn
0 Stars
0 Forks
2 Versions
TypeScript Repo language

Scan summary

picgo-plugin-notion-migrator was last scanned on 29 Nov 2026 at version 0.1.0. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 2 versions, all published on 29 Nov 2026.
  • Findings: No rules fired in version 0.1.0.

Versions

2 versions published
Versions and the rules that fired in each
VersionPublishedStatus
0.1.0 LATEST 29 Nov 2026 No rules fired
0.0.0-stage 29 Nov 2026 Not shown

No rules fired in 0.1.0

Findings

Findings for v0.1.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 0.1.0; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

picgo-plugin-notion-migrator

中文说明

Move images stored in Notion to the image host you use in PicGo, and free Notion file storage.

Notion's Free plan limits a workspace to 512 MB of uploaded files. Images that are embedded by URL don't count, and per Notion's help neither do files you replaced or files that only remain in version history. This plugin finds image blocks whose file is hosted by Notion, downloads each one, uploads it through PicGo, and switches the same block to the new URL. The block keeps its id, position, caption and comments, so links to the block still work.

Requirements

  • PicGo 3.0.0 or later (GUI), or PicGo-Core 3.0.0 or later (CLI), on Node.js 20.19 or later.
  • An image host that already works in PicGo. Everything you configured runs as usual: the uploader, compression or watermark plugins, rename and URL rewrite rules.
  • A Notion token with read and update access to the pages you want to migrate.

Install

GUI: open PicGo → Plugins, search for notion-migrator and install it.

CLI:

picgo install notion-migrator

Get a Notion token

Either kind of token works; the plugin only sends it as a Bearer token.

Personal access token (recommended). It acts as you, so it sees every page you can see and needs no sharing.

  1. Open Personal access tokens in the Notion developer portal and select New token.
  2. Name it, give it the Notion API capability, pick the workspace and an expiration.
  3. Select Create token and copy the value. Notion shows it only once.

Internal connection. It acts as a separate bot and only sees pages you share with it. You need to be a workspace owner to create one.

  1. In the developer portal, select New connection, choose API token as the authentication method and create it.
  2. On the Configuration tab, copy the API token and make sure the connection can read and update content.
  3. Share pages with it: either Content access → Edit access in the developer portal, or on a page ••• → Connections → Add connection. Sharing a page also shares its child pages.

Configure

GUI: Plugins → notion-migrator → Config plugin. CLI: picgo set plugin notion-migrator.

Field Meaning
Notion token The token from above. Stored in PicGo's config file. For the CLI you can set NOTION_TOKEN instead; it wins over the saved value.
Pages Optional. Page or database URLs or ids, separated by commas, spaces or new lines. Each one is scanned with everything under it. Empty means every page that Notion's search returns for the token.
Include Optional regular expression on the file name. Only matching images are migrated.
Exclude Optional regular expression on the file name. Matching images are skipped.

Page URLs can be copied from the browser or from Share → Copy link. Ids with or without dashes work, and so do database URLs opened in peek mode (?p=).

Use

CLI
# List Notion-hosted images; nothing is changed
picgo notion scan
picgo notion scan --page https://www.notion.so/My-Page-0123456789abcdef0123456789abcdef --size
picgo notion scan --json > images.json
picgo notion scan --out images.json

# See what would happen, then migrate a few, then everything
picgo notion migrate --dry-run
picgo notion migrate --limit 5
picgo notion migrate
picgo notion migrate --page <url-or-id> --yes

scan options: --page <url-or-id...> (overrides the configured pages), --scan-mode <markdown|blocks> (see Scan modes), --json (print JSON instead of text), --out <file> (also write JSON to a file), --size (ask Notion's storage for each file size, one extra request per image).

migrate options: --page <url-or-id...>, --scan-mode <markdown|blocks>, --dry-run, --limit <n>, --yes (skip the confirmation; required when not in a terminal), --batch-size <n> (images per PicGo upload, default 5).

Press Ctrl+C once to stop after the current image, twice to quit immediately.

GUI

In the plugin's menu:

  • Scan shows how many Notion-hosted images there are, per page.
  • Migrate all scans the configured pages (or everything) and asks before changing anything.
  • Migrate a page asks for one page URL or id.
  • Stop stops the current run after the image in progress.

Progress shows as a notification at every 10%, and a final notification has the counts. If Rename before upload is on in PicGo settings, the plugin warns first, because PicGo would open a rename window for every image.

How it works

  1. Scan. Starting from the configured pages (or from Notion search), the plugin reads every page, including nested blocks such as toggles, columns, callouts, lists, tables and tabs. It follows child pages and inline databases, reading every row. Synced block copies are skipped, because their content lives in the original block. Trashed blocks and images that already use a URL are skipped.
  2. For each image, in batches: read the block again, download it to a temporary file named after the block id, upload the batch with PicGo, then update the block with PATCH /v1/blocks/{id} to point at the new URL. Reading the block right before the update gets a fresh download link (Notion's links expire after an hour) and checks that it is still an image holding the same Notion-hosted file, so an image you replaced or deleted after the scan is followed or skipped instead of overwritten.
  3. Every upload and every block update is appended to a journal. Run the same command again to resume: finished blocks are skipped, and blocks that were uploaded but not yet updated are only updated, without uploading again.

Files the plugin writes, under PicGo's config folder (~/.picgo by default):

  • notion-migrator/journal.jsonl: the journal, one JSON line per event.
  • notion-migrator/reports/*.json: one report per migrate run, listing each image with its new URL or the reason it failed or was skipped.

Temporary downloads go to the system temp folder and are deleted at the end of each run.

Scan modes
  • markdown (default) reads each page with one request, GET /v1/pages/{id}/markdown, which returns the whole page with nested blocks inlined. Each Notion-hosted image carries its block id in the link, so no block has to be read one by one. Pages over about 20,000 blocks come back truncated; the missing parts are fetched by id, one request each. If Notion refuses a page there (400 or 403), that page is read block by block instead, and after three refusals in a row with no success the rest of the scan switches to blocks.
  • blocks walks GET /v1/blocks/{id}/children: one request per page and per block that has children (each toggle, column, callout, list item with sub-items...), plus one per 100 children. Use it if the markdown endpoint misbehaves for your workspace.

Both modes find the same images. Blocks Markdown can't show, such as template buttons, are read with the block API in either mode.

Request cost
Step Requests
Each configured page 1 to read its title
Each page, markdown mode 1, plus 1 per truncated part of a page over about 20,000 blocks
Each page, blocks mode 1 per block with children, plus 1 per 100 children
Each database 1, plus 1 per 100 rows
Search, when no pages are configured 1 per 100 results
Each migrated image 2: read the block, then update it
scan --size 1 per image, to Notion's file storage, not the API

Titles for reports come from what the scan already read: search results, database rows and child page links. Downloads go to Notion's file storage and don't count toward the API limit.

For example, the test page used during development (columns, a toggle, a synced block, a child page and an inline database with one row) took 11 requests in blocks mode and 6 in markdown mode. Pages with many toggles, columns or nested lists save more.

All Notion requests share one rate limiter at about 2.5 requests per second, under Notion's limit of 180 per minute. When Notion answers 429 or 529, the plugin waits for the Retry-After time and retries, and it retries server errors and network errors with backoff. Requests go through PicGo's HTTP client, so the proxy in PicGo settings applies.

Privacy

Files uploaded to Notion are private: Notion serves them through signed links that expire. Most image hosts return public URLs that anyone with the link can open, forever. Before migrating, make sure the images are fine to be public, or use a host with private buckets or access control. Use Exclude or --page to leave sensitive pages alone.

The token is stored in PicGo's config file in plain text, like other PicGo secrets. Prefer a personal access token with a short expiration, and revoke it when you are done.

Limitations

  • Only image blocks are migrated. Not yet supported: file, PDF, video and audio blocks, page covers and icons, and files in database properties.
  • Notion's search, used when no pages are configured, is not guaranteed to return every page. If something is missing, add its parent page to Pages.
  • Linked database views of a database the token can't read are reported as warnings and skipped.
  • Notion's API lists these extensions for external images: bmp, gif, heic, jpeg, jpg, png, svg, tif, tiff. WebP and other unlisted extensions are migrated with a warning in the report, since the Notion app displays them. AVIF is skipped, because Notion doesn't list it anywhere and a working image shouldn't be replaced by one that may not render. If a compression plugin turns uploads into .avif, those updates fail instead of being written.
  • Notion rejects external URLs longer than 2000 characters; such images are reported as failed.
  • Uploaded files are named <blockId>.<ext> so names never collide. Rename plugins and PicGo's own rename settings still apply.
  • Migrating changes the blocks, so pages show as edited by you or the connection.
  • The old file stays in the page's version history, which per Notion's help no longer counts toward storage.
  • PicGo can't cancel an upload in progress, so Stop takes effect after the current batch's uploads finish.

Development

pnpm install
pnpm build      # TypeScript → dist/ (CommonJS, loaded by PicGo with require)
pnpm lint       # eslint + type check
pnpm test       # build, then unit and end-to-end tests

The end-to-end test loads dist/index.js into a real PicGo-Core instance and runs the CLI and GUI menu against a local mock Notion server. Two environment variables exist for that and are not meant for normal use: NOTION_MIGRATOR_API_URL (API base URL) and NOTION_MIGRATOR_RPS (requests per second).

Commits and releases

The repo follows the PicGo commit convention through @picgo/bump-version: use pnpm cz to write a commit message, and the commit-msg hook checks it with commitlint.

To release, run pnpm release (patch by default, -t minor or -t major for bigger bumps). It bumps package.json, updates CHANGELOG.md, commits, and creates a v<version> tag. Push both with git push --follow-tags origin main; the tag starts the release workflow, which lints, tests, builds and publishes to npm with provenance through npm trusted publishing, so no npm token is stored in the repo.

License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm picgo-plugin-notion-migrator

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Powered by Read the latest findings

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Copy of Template Design OX Blog (3)
Research

Ruby2Shell: Ruby Memory Corruption Flaws Expose Applications to Remote Code Execution, But is it an Actual Risk?

Plug and Pray: Your AI Agents Are Taking Orders From Strangers
Research

Plug and Pray: Your AI Agents Are Taking Orders From Strangers

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229