R2 Uploader is an Obsidian plugin that uploads images to Cloudflare R2 and automatically replaces local links with remote ones.
⚠️ This plugin is not an officially released Obsidian plugin — it’s a personal project currently in development.
- Automatic Image Upload: Automatically uploads clipboard images to Cloudflare R2 when pasted
- Upload Confirmation: Optional dialog before upload
- Publish Page: Uploads all local images in the current note and replaces links automatically
- Flexible Path Variables: Supports dynamic paths using variables like
{year},{mon},{day},{filename} - Custom Domain Support: Use either your
r2.devURL or a custom domain
- Copy this plugin into your Obsidian plugin folder.
- Enable it from the Obsidian settings.
- Enter your Cloudflare R2 account credentials in the plugin settings.
- Sign up at Cloudflare.
- Enable R2 Storage in your Cloudflare dashboard.
- Create a new R2 bucket for storing images.
- Go to R2 → Overview → Manage R2 API Tokens in your Cloudflare dashboard.
- Click Create API Token.
- Grant Read/Write permissions.
- Copy the generated Access Key ID and Secret Access Key.
In the plugin settings, enter the following information:
| Field | Description |
|---|---|
| Access Key ID | Your Cloudflare R2 access key ID |
| Secret Access Key | Your Cloudflare R2 secret access key |
| Endpoint | https://<account-id>.r2.cloudflarestorage.com |
| Bucket Name | The name of your R2 bucket |
| Custom Domain | Optional – your r2.dev URL or a custom domain |
| Setting | Description |
|---|---|
| Target Path | Image storage path (supports {year}, {mon}, {day}, {filename}) |
| Use image name as Alt Text | Use the image filename as alt text |
| Update original document | Replace local links with R2 links automatically |
| Ignore note properties | Ignore frontmatter/note properties when pasting |
| Show progress modal | Display upload progress |
| Confirm before upload | Show a confirmation dialog before uploading |
- Copy an image to your clipboard.
- Paste it into the Obsidian editor (Ctrl+V).
- When prompted, choose “Upload” or “Always Upload.”
- Open the command palette (Ctrl+P).
- Run “Publish Page to R2.”
- All local images in the current note will be uploaded to R2, and their links will be automatically replaced.
npm run buildnpm run devThis plugin was heavily inspired by the following open-source projects:
- obsidian-imgur-plugin → Logic for instant image uploads
- obsidian-image-upload-toolkit → Logic for Cloudflare R2 integration
MIT License