Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

Image to COS

bozhangbozhang66 downloads

Upload local images in Markdown to cloud storage (COS, OSS, Qiniu, SM.MS, GitHub) and replace links automatically.

Add to Obsidian
  • Overview
  • Scorecard
  • Updates7

Upload local images in your Markdown documents to cloud storage and automatically replace the links.

English | 中文

Features

  • One-click upload: Upload all local images or videos in the current document with a single command
  • Multiple cloud storage support: Tencent Cloud COS, Alibaba Cloud OSS, Qiniu, SM.MS, GitHub
  • Flexible path templates: Organize your media by date, document name, hash, or custom patterns
  • Duplicate detection: Skip already uploaded files using content hash caching
  • Wiki link support: Handles both standard Markdown ![](path) and Obsidian ![[path]] syntax
  • Video support: Upload MP4, WebM, MOV, MKV and more, with native Obsidian video embeds

Installation

From Obsidian Community Plugins

  1. Open Settings → Community plugins
  2. Select Browse and search for "Image to COS"
  3. Select Install, then Enable

Manual Installation

  1. Download main.js, manifest.json, and styles.css from the latest release
  2. Create a folder image-to-cos in your vault's .obsidian/plugins/ directory
  3. Copy the downloaded files into the folder
  4. Restart Obsidian and enable the plugin in Settings → Community plugins

Quick Start

1. Enable the Plugin

  1. Open Obsidian
  2. Go to Settings → Community plugins
  3. Turn off "Restricted mode" (if not already)
  4. Find Image to COS in the installed plugins list and enable it

2. Configure Cloud Storage

  1. Go to Settings → Image to COS
  2. Select your cloud storage provider (Tencent Cloud COS, Alibaba Cloud OSS, Qiniu, SM.MS, or GitHub)
  3. Fill in the required credentials

Example for Tencent Cloud COS:

  • SecretId: Your Tencent Cloud API key ID
  • SecretKey: Your Tencent Cloud API key
  • Bucket: Bucket name (e.g., my-bucket-1250000000)
  • Region: Region code (e.g., ap-guangzhou)
  • Custom URL: Optional, for CDN acceleration
  1. Click Test Connection to verify your configuration

3. Upload Images or Videos

  1. Open a Markdown document containing local images/videos
  2. Press Ctrl/Cmd + P to open the command palette
  3. Run Upload images to cloud storage or Upload videos to cloud storage
  4. The plugin will automatically:
    • Scan for local images/videos in the document
    • Upload them to cloud storage
    • Replace local paths with remote URLs

Supported Image Syntax

The plugin recognizes the following local image formats:

![alt text](images/photo.png)     # Standard Markdown
![[images/photo.png]]             # Obsidian Wiki link
![[images/photo.png|My Photo]]    # Wiki link with alias

Supported Video Syntax

The plugin recognizes the following local video embeds:

![alt text](videos/demo.mp4)     # Standard Markdown embed
![[videos/demo.mp4]]             # Obsidian Wiki embed
![[videos/demo.mp4|Demo]]        # Wiki embed with alias

HTML Tags

The plugin also detects media inside HTML tags and uploads the local files:

<img src="images/photo.png" alt="Photo">

<video controls>
  <source src="videos/demo.mp4" type="video/mp4">
</video>

<video src="videos/direct.webm" controls></video>

Only the src attribute is replaced with the remote URL; the rest of the tag is preserved.

After upload, links are replaced with remote URLs. Obsidian renders ![](remote-url.mp4) as a video player.

Configuration

Open Settings → Image to COS to configure the plugin.

Cloud Storage Selection

Choose your preferred cloud storage provider:

  • Tencent Cloud COS: Requires SecretId, SecretKey, Bucket, and Region
  • Alibaba Cloud OSS: Requires AccessKeyId, AccessKeySecret, Bucket, and Area
  • Qiniu: Requires AccessKey, SecretKey, Bucket, URL, and Area
  • SM.MS: Optional API Token (anonymous upload available with rate limits)
  • GitHub: Requires Personal Access Token, Repository, Branch, and Path

Path Templates

Configure how uploaded images are organized in cloud storage:

Template Pattern Example
By date {year}/{month}/{day}/{filename}-{hash}.{ext} 2026/02/02/screenshot-a1b2c3d4.png
By document notes/{note}/{filename}-{hash}.{ext} notes/My Note/screenshot-a1b2c3d4.png
By document path {note-path}/{filename}.{ext} diary/2026/02/My Note/screenshot.png
Pure hash images/{hash-full}.{ext} images/a1b2c3d4e5f6...png
Timestamp img/{timestamp}-{filename}.{ext} img/1738483200000-screenshot.png

Available variables:

  • {year} - Current year (4 digits)
  • {month} - Current month (2 digits)
  • {day} - Current day (2 digits)
  • {timestamp} - Unix timestamp (milliseconds)
  • {filename} - Original filename (without extension)
  • {ext} - File extension (without dot)
  • {hash} - MD5 hash (first 8 characters)
  • {hash-full} - Full MD5 hash (32 characters)
  • {note} - Current document name (without extension)
  • {note-path} - Current document relative path
  • {uuid} - Random UUID (8 characters)

Cache Management

  • Enable duplicate detection: Skip images/videos that have already been uploaded
  • Clear cache: Remove all cached hash-URL mappings

Supported Image Formats

  • PNG
  • JPG / JPEG
  • GIF
  • WebP
  • SVG
  • BMP

Supported Video Formats

  • MP4
  • WebM
  • MOV
  • M4V
  • MKV
  • AVI
  • OGV
  • 3GP
  • WMV
  • FLV

Note: Video files can be large. GitHub uploads are limited to 100 MB per file, and SM.MS is limited to 5 MB. Tencent Cloud COS, Alibaba Cloud OSS, and Qiniu are recommended for larger videos.

Requirements

  • Obsidian v0.15.0 or higher
  • Desktop only (not supported on mobile)

Security

  • All credentials are stored locally in Obsidian's data.json
  • Network requests are only made to your configured cloud storage endpoint
  • No telemetry or data collection

Development

# Install dependencies
npm install

# Build for development (watch mode)
npm run dev

# Build for production
npm run build

# Run linter
npm run lint

License

MIT

Credits

This plugin uses PicGo-Core for image uploading.

HealthExcellent
ReviewCaution
About
Upload all local images in the current document with one command and automatically replace links in Markdown and Obsidian wiki syntax. Support multiple cloud providers (Tencent COS, Alibaba OSS, Qiniu, SM.MS, GitHub), flexible path templates, and duplicate detection via content hashing.
ImagesIntegrations
Details
Current version
1.4.0
Last updated
3 weeks ago
Created
8 months ago
Updates
7 releases
Downloads
66
Compatible with
Obsidian 1.6.6+
Platforms
Desktop only
License
MIT
Report bugRequest featureReport plugin
Author
bozhangbozhangmrelvin
GitHubmrelvin
  1. Community
  2. Plugins
  3. Images
  4. Image to COS

Related plugins

Image auto upload

Upload images from your clipboard by PicGo.

BRAT

Easily install a beta version of a plugin for testing.

LanguageTool Integration

Advanced grammar and spell checking, powered by LanguageTool.

Self-hosted LiveSync

Sync vaults securely to self-hosted servers or WEBRTC.

Fast Note Sync

Real-time sync of your vaults across server, mobile, and web; shareable with anyone; supports REST and MCP integrations to build your personal AI knowledge base.

Custom Frames

Turn web apps into panes using iframes with custom styling. Also comes with presets for Google Keep, Todoist and more.

Local REST API with MCP

Unlock your automation needs by interacting with your notes over a secure REST API.

Maps

Adds a map layout to bases so you can display notes as an interactive map view.

Google Drive Sync

Syncs a vault into Google Drive for cross-platform use (works for iOS).

Agent Client

Chat with Claude Code, Codex, Gemini CLI, and more via the Agent Client Protocol — right from your vault.