mirror of
https://github.com/fantasy-ke/obsidian-cf-imgbed.git
synced 2026-07-22 06:43:08 +00:00
4.3 KiB
4.3 KiB
CF ImageBed - Obsidian Plugin
An Obsidian plugin for uploading images to CloudFlare ImgBed service with multiple upload methods and flexible configuration options.
Features
- 🖼️ Multiple Upload Methods: Support drag & drop, paste, and file selection
- ⚙️ Flexible Configuration: Multiple upload channels and naming options
- 🚀 Quick Integration: Automatically insert Markdown image links after upload
- 📱 Cross-Platform: Support desktop and mobile devices
- 🎯 Smart Handling: Prevents duplicate content from Obsidian's default image handling
Installation
Manual Installation
- Download
main.js,manifest.json, andstyles.cssfiles - Copy files to your Obsidian vault's
.obsidian/plugins/cf-imageBed/directory - Restart Obsidian and enable the plugin
Development Installation
- Clone this repository
- Ensure Node.js version is at least v16
- Run
npm installto install dependencies - Run
npm run devto start development mode compilation - Run
npm run buildto build production version
Usage
1. Plugin Configuration
- Open Obsidian Settings
- Go to Community plugins page
- Find CF ImageBed plugin and enable it
- Click the gear icon next to the plugin to enter settings
- Configure the following required parameters:
- API URL: Your CloudFlare ImgBed service address (e.g.,
https://your.domain) - Auth Code: Your upload authentication code
- API URL: Your CloudFlare ImgBed service address (e.g.,
2. Optional Configuration
- Upload Channel: Choose
telegram,cfr2, ors3 - File Naming: Select file naming rules
- Return Format: Choose return link format
- Upload Folder: Specify upload directory (optional)
- Server Compression: Enable server-side compression
- Auto Retry: Automatically switch channels on failure
3. Upload Images
The plugin supports four upload methods:
Method 1: Command Palette
- Press
Ctrl+P(Windows/Linux) orCmd+P(Mac) to open command palette - Type "Upload image to CF ImageBed" and select
- Choose the image file to upload
Method 2: Drag & Drop
- Drag image files directly to Obsidian editor
- Plugin will automatically upload and insert Markdown links
Method 3: Paste Upload
- Copy image to clipboard
- Press
Ctrl+V(Windows/Linux) orCmd+V(Mac) in Obsidian editor - Plugin will automatically upload and insert Markdown links
Method 4: Right-click Upload
- Right-click in editor and select "Upload image to CF ImageBed"
- Choose the image file to upload
API Configuration
This plugin uses CloudFlare ImgBed's upload API with the following parameters:
- Endpoint:
/upload - Method:
POST - Authentication: Upload authentication code
- Content Type:
multipart/form-data
For detailed API documentation, please refer to CloudFlare ImgBed official documentation.
Troubleshooting
Common Issues
-
Upload Failed
- Check if API URL and auth code are correctly configured
- Verify network connection
- Check if CloudFlare ImgBed service is running normally
-
Images Not Displaying
- Confirm return link format is correct
- Check domain configuration
-
Drag & Drop Not Working
- Ensure plugin is properly enabled
- Restart Obsidian and try again
Development Info
- Author: fantasy-ke
- Version: 1.0.0
- License: MIT
- GitHub: https://github.com/fantasy-ke
Support
If you find this plugin helpful, please consider supporting the development:
- ⭐ Star this repository on GitHub
- 🐛 Report bugs and suggest features
- 💖 Buy me a coffee to support continued development
Donation Methods
- PayPal: Donate via PayPal
- ko-fi: Sponsor on ko-fi
- WeChat Pay:
-
- Alipay:
-
Contributing
Contributions are welcome! Please feel free to submit Issues and Pull Requests to improve this plugin.
License
This project is licensed under the Apache License. See the LICENSE file for details.