LskyPro Image Uploader

by aceak
5
4
3
2
1
Score: 50/100

Description

An Obsidian plugin that automatically uploads local images to LskyPro and replaces them with external URLs — making your notes cleaner, lighter, and easier to share.

Reviews

No reviews yet.

Stats

6
stars
317
downloads
2
forks
110
days
110
days
110
days
18
total PRs
0
open PRs
1
closed PRs
17
merged PRs
1
total issues
0
open issues
1
closed issues
63
commits

Latest Version

4 months ago

Changelog

Release Notes

⚠️ Breaking Changes

  • Plugin Renamed
    Renamed from LskyPro Upload V2 to LskyPro Image Uploader to comply with Obsidian's plugin naming guidelines.
    Plugin ID changed from lskypro-upload-v2 to lskypro-image-uploader.

    Obsidian will treat this as a new plugin. To migrate your settings, copy:
    .obsidian/plugins/lskypro-upload-v2/data.json → .obsidian/plugins/lskypro-image-uploader/data.json

  • Bumped minAppVersion to 1.8.7
    getLanguage() was introduced in Obsidian 1.8.7. The previous minAppVersion: 1.8.0 could cause a crash on versions 1.8.0–1.8.6.

🧩 Fixes

  • Added evt.defaultPrevented guard at the start of editor-paste handler to avoid conflicts with other plugins.
  • Added evt.defaultPrevented guard at the start of editor-drop handler to avoid duplicate processing.

✨ Improvements

  • Updated plugin metadata, README, and documentation to reflect the new name.

🧪 Compatibility

  • ✅ Compatible with existing LskyPro V1 / V2 API configurations
  • ⚠️ Plugin settings need manual migration (see above)

更新日志

⚠️ 重要变更

  • 插件更名
    因 Obsidian 插件规范要求,插件名称由 LskyPro Upload V2 更名为 LskyPro Image Uploader。
    插件 ID 由 lskypro-upload-v2 变更为 lskypro-image-uploader。

    Obsidian 会将其识别为新插件。如需迁移旧设置,请手动拷贝:
    .obsidian/plugins/lskypro-upload-v2/data.json → .obsidian/plugins/lskypro-image-uploader/data.json

  • minAppVersion 提升至 1.8.7
    getLanguage() 在 Obsidian 1.8.7 才引入,旧版 minAppVersion: 1.8.0 可能导致 1.8.0–1.8.6 版本的用户崩溃。

🧩 问题修复

  • editor-paste 处理器开头增加 evt.defaultPrevented 检查,避免与其他插件冲突。
  • editor-drop 处理器开头增加 evt.defaultPrevented 检查,避免重复处理。

✨ 优化改进

  • 更新插件元数据、README 及文档以反映新名称。

🧪 兼容性

  • ✅ 兼容现有 LskyPro V1 / V2 API 配置
  • ⚠️ 插件设置需手动迁移(见上方说明)

Full Changelog: https://github.com/Aceak/LskyPro-Image-Uploader/compare/1.1.4...1.2.0

README file from

Github

LskyPro Image Uploader

An automatic image uploader plugin for Obsidian

Formerly LskyPro Upload V2 (lskypro-upload-v2).

English | 简体中文

A lightweight and efficient image uploader plugin for Obsidian,
supporting LskyPro V1 / V2 APIs, multiple upload methods, and batch operations.


🚀 Features

  • Auto Upload: Automatically uploads and replaces pasted images with URLs
  • Multi-Version Support: Fully compatible with LskyPro V1 / V2 APIs
  • Multiple Upload Methods: Supports clipboard, drag-and-drop, right-click menu, and command palette
  • Batch Upload: Upload all local images in the current note with one click
  • Concurrent Upload: Supports low/medium/high concurrency modes for faster batch uploads
  • Smart Processing: Optional network image handling and automatic source file deletion
  • Multi-Language Support: Built-in Chinese and English language switching

📋 Quick Start

Prerequisites

Before using this plugin, make sure you have:

  1. A running and accessible LskyPro image hosting service
  2. Enabled API access in your LskyPro configuration
  3. A valid Access Token (found under User Center → Personal Token)
  4. For V2 version, a valid Storage ID is required (administrators can check through admin panel, users can obtain via API)

Plugin Setup

  1. Open Obsidian → Settings → Community Plugins → LskyPro Image Uploader
  2. Fill in the basic configuration fields:
Field Description
LskyPro URL Example: https://img.example.com
Access Token Your LskyPro access token
Version Select V1 or V2
Storage ID Optional for V1; Required for V2 (see API Docs)
  1. Advanced options configuration:
Field Description
Clipboard Auto Upload Automatically upload pasted images (desktop only)
Attachment Auto Upload Automatically process attachment images (mobile only)
Process Network Images Whether to process pasted network image links
Network Blacklist Domains Specify domains that should not be processed
Fix Paths Automatically fix file path issues
Apply Image Processing Whether to apply image processing rules
Delete Source Files After Upload Whether to delete local files after successful upload
Concurrency Mode Number of concurrent uploads (low/medium/high)
Language Plugin interface language (auto/Chinese/English)

💡 Usage Guide

Clipboard Auto Upload

When you paste an image into the editor, the plugin will:

  1. Automatically upload it to your LskyPro server;
  2. Replace it with a Markdown image link, for example:
![image](https://img.example.com/uploads/2025/xx.png)

Mobile Attachment Auto Upload

When you click the attachment button and select an image file, the plugin will:

  1. Automatically upload it to your LskyPro server;
  2. Replace it with a Markdown image link:
![image](https://img.example.com/uploads/2025/xx.png)

Note: This feature hasn't been thoroughly tested on mobile devices and may have compatibility issues. Further testing and optimization will be conducted after the plugin is published.


Right-Click Upload

Right-click on a local image (in the file explorer or editor),
then choose “Upload to LskyPro” — the plugin will upload it instantly and return the image URL.

Perfect for manually uploading individual attachments.


Drag-and-Drop Upload

Simply drag local image files into the editor.
The plugin will detect the file type and automatically replace it with an image URL in Markdown syntax.


Batch Upload (All Images in Current File)

  1. Open the Command Palette (Ctrl + P or Cmd + P)
  2. Search for and run Upload all images
  3. The plugin scans and uploads all local images in the current note

You can configure concurrency mode (low/medium/high) in settings to significantly improve batch upload speed.


Batch Download

Reverse the process — download all remote images to local storage:
Command: Download all images.


Enable Debug Mode

Need to set the developer mode output mode to Detailed first, then you can enable debug info.

🔍 LskyPro Version Notes

This plugin is based on NekoTarou/lskypro-auto-upload,
with LskyPro V2 API support and automatic response parsing.
Reference: Lsky Pro API Documentation.

Field LskyPro V1 LskyPro V2
Storage Config Optional (if only one strategy exists) Required (must specify correct storage ID)
Token Auth User Token User Token
API Endpoint /api/v1/upload /api/v2/upload

⚠️ Notes

  1. After updating, restart Obsidian to ensure new features take effect
  2. Upload failures are usually caused by network instability or expired tokens
  3. Keep your token secure — never share it publicly
  4. After switching between LskyPro versions, re-enter the storage configuration
  5. Upload paths are managed by your LskyPro server, not modified by the plugin

🧭 Development Roadmap & Changelog

Implemented Features

Feature Status Description
Concurrent Upload ✅ Done Supports low/medium/high concurrency modes for faster batch uploads
Auto Delete Local Attachments ✅ Done Automatically remove local files after successful upload to keep library clean
LskyPro V1 / V2 Auto Detection ✅ Done Automatically detect and adapt to different API response formats
Right-Click Upload ✅ Done Upload directly from Obsidian's context menu
Response Result Optimization ✅ Done Unified handling of status/message/data parsing logic
Multi-Language Support ✅ Done Built-in Chinese and English language switching
Network Image Processing ✅ Done Option to process pasted network image links

Planned Features

  • Image compression options
  • Enhanced upload status notifications
  • Fix frontmatter image-auto-upload override inconsistency between paste and drop handlers

🤝 Acknowledgements

Special thanks to the following projects for inspiration and reference:


👨‍💻 Project Information

📜 License

This project is licensed under the MIT License.