npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

picgo-plugin-imgroute

v1.0.0

Published

PicGo 上传插件 - ImgRoute 图床

Readme

picgo-plugin-imgroute

ImgRoute 图床的 PicGo 上传插件,支持两步式上传流程。

安装方式

GUI 安装(推荐)

  1. 打开 PicGo 客户端
  2. 进入「插件设置」
  3. 搜索 imgroute 并安装(需发布到 npm 后可用)

CLI 安装

picgo install imgroute

本地开发安装

# 克隆或下载插件代码到本地
picgo install /path/to/picgo_plugin

配置说明

| 配置项 | 类型 | 必填 | 默认值 | 说明 | |--------|------|------|--------|------| | server | input | 是 | https://imgroute.com | ImgRoute 服务器地址 | | apiKey | input | 是 | - | API Key,用于身份验证 |

API Key 获取方式

  1. 登录 ImgRoute 控制台
  2. 进入「高级功能」→「API Key 管理」
  3. 点击「生成 Key」获取 API Key

注意:仅旗舰版和企业版用户可使用 API 上传功能。

支持的图片格式

  • PNG (.png)
  • JPEG (.jpg, .jpeg)
  • GIF (.gif)
  • WebP (.webp)
  • BMP (.bmp)
  • SVG (.svg)
  • TIFF (.tiff)
  • ICO (.ico)

上传流程

┌─────────────┐     预签名请求      ┌─────────────┐
│   PicGo     │ ─────────────────→ │  ImgRoute   │
│   客户端     │  POST /api/v1/upload │   API       │
└─────────────┘                    └─────────────┘
       ↑                                  │
       │    返回 upload_url, cdn_url      │
       └──────────────────────────────────┘
       ↓
┌─────────────┐     文件上传        ┌─────────────┐
│   PicGo     │ ─────────────────→ │   IO 节点    │
│   客户端     │  POST upload_url   │  (直接上传)  │
└─────────────┘                    └─────────────┘
       ↑                                  │
       │         上传成功                │
       └──────────────────────────────────┘
       ↓
   返回 CDN 链接给用户
  1. 预签名:向 ImgRoute API 发送预签名请求,获取上传 URL 和 CDN 地址
  2. 文件上传:直接将文件上传到 IO 节点(使用预签名 URL)
  3. 返回链接:上传成功后,PicGo 获得 CDN 链接并插入到编辑器中

错误码说明

| 错误码 | 说明 | 解决方案 | |--------|------|----------| | FILE_TOO_LARGE | 文件超过大小限制 | 压缩图片或升级套餐 | | DAILY_LIMIT_REACHED | 已达到每日上传限制 | 等待次日重置或升级套餐 | | STORAGE_LIMIT_REACHED | 存储空间不足 | 清理旧图片或升级套餐 | | PLAN_NOT_SUPPORTED | 当前套餐不支持 API 上传 | 升级至旗舰版或企业版 | | NO_AVAILABLE_IO_NODE | 暂无可用的 IO 节点 | 稍后重试 | | INVALID_API_KEY | API Key 无效或已过期 | 检查 API Key 或重新生成 |

日志查看

上传过程中会输出详细日志,可在 PicGo 日志面板查看:

  • [ImgRoute] 请求预签名: xxx - 开始预签名流程
  • [ImgRoute] 预签名成功: image_id=xxx - 预签名成功
  • [ImgRoute] 开始上传: xxx (xxx bytes) - 开始文件上传
  • [ImgRoute] 上传成功: xxx - 文件上传成功
  • [ImgRoute] 图片地址: xxx - 最终 CDN 地址

许可证

MIT