Quickly upload images to the cloud in Logseq.

Overview

logseq-plugin-image-uploader

Usage

How to use it?

Currently, we only support PicGo, so please open PicGo manually.

By default, when you paste any content into a block, after exit editing that block, the plugin will check whether its content contains any images, if it does, the plugin will upload them and replace them with remote URLs. You can turn off this feature in the configuration file.

example_usage

Alternatively, if you have inserted any images before, you can right-click any block's dot to show its context menu, and select Upload image. All images detected in that block will be uploaded, and replaced with remote URLs.

example_usage

Note

Since we don't have any permission to operate the file system in a logseq plugin, we can't delete the original file saved by logseq. So we create pages named "Uploaded image file record(created by logseq-plugin-image-uploader)" and "Uploaded image file record - interactive(created by logseq-plugin-image-uploader)" to save all the images we uploaded. You can delete them manually. (One image path actually can appear more than once on that page, for example, you use that image many times, and you upload them more than once) And we list out all local images in the record page using a query, so you can upload images that already exist.

We may provide a script to delete those images in the future.

Installation

  • Download the latest release of the plugin.
  • Open Logseq Desktop client and turn on Developer Mode in the user settings panel
  • Open the toolbar dot menus and navigate to the plugins page
  • Read the README file
  • Navigate to the plugins dashboard: t p
  • Click the Load unpacked plugin button, then select the sample directory to load it

Note: You can't use the plugin downloaded from marketplace due to CORS restriction. Please load it manually.

Configuration

Currently, we only support turning off auto uploading feature and allow uploading network images feature in the configuration file. Note that at present, only network images using Markdown syntax will be uploaded, although the picture link will also be correctly displayed by Logseq.

{
  "disabled": false,
  "autoUploading": true,
  "uploadNetworkImage": false,
}

Development

Logseq plugins API: https://logseq.github.io/plugins/

Build

  • Install the latest stable distribution of Node.js.
  • Install pnpm.
  • Run pnpm install
  • Run pnpm build

Debug

You can open developer tools in Logseq Desktop client's menu bar: View -> Toggle Developer Tools(or using keyboard shortcut: Command + Option + I).

FAQ

Why only PicGo is supported?

Currently, logseq plugins are running in a browser-only sandbox, which means we can't access the file system or execute any local scripts. PicGo provides a local server to upload images by HTTP(s) request, we choose PicGo as a start point. If we want to support more image uploading software, either it provides a similar feature, or we should launch a local server with the Logseq Desktop client.

I failed to upload with PicGO.

First, make sure PicGo is running, and then check PicGo server is configured to run at port 36677. We'll provide a setting for the plugin in the future.

If it keeps failing, please fire a new issue.

You might also like...

MidJourney is an AI text-to-image service that generates images based on textual prompts. It is often used to create artistic or imaginative images, and is available on Discord and through a web interface here.

MidJourney is an AI text-to-image service that generates images based on textual prompts. It is often used to create artistic or imaginative images, and is available on Discord and through a web interface here.

Midjourney MidJourney is an AI text-to-image service that generates images based on textual prompts. It is often used to create artistic or imaginativ

May 1, 2023

tools and plugins for logseq

logtools tools and plugins for logseq logtools-css-productivitypack my css mods for Kanban/columns view (#.v-kanban), Einsihower Matrix (#.v-einsenhow

Jan 2, 2023

Weekly, Monthly and Yearly notes in Logseq!

Periodic Notes for Logseq Currently is very early stages. My roadmap for releasing on the Logseq marketplace can view viewed here Functionality Curren

Dec 29, 2022

A logseq plugin to extract tweets. Optionally tag the tweet's author as well.

A logseq plugin to extract tweets. Optionally tag the tweet's author as well.

Logseq Twitter Extractor Plugin If this plugin helps you, I'd really appreciate your support. You can buy me a coffee here. A quick utility to parse a

Nov 17, 2022

Migrate unfinished tasks to today, Logseq plugin

Migrate unfinished tasks to today, Logseq plugin

Unfinished-business Unfinished Business Because the day may be over, but your business isn't View Demo · Report Bug · Request Feature This plugin migr

Nov 16, 2022

logseq custom.js and custom.css utilities : resize query table columns, hide namespaces...

logseq custom.js and custom.css utilities : resize query table columns, hide namespaces...

logseq-custom-files custom.js and custom.css utilities for Logseq. current version v20220331 query table view : add handles on the query table headers

Dec 7, 2022

Embed Luckysheet (spreadsheet) into Logseq.

Embed Luckysheet (spreadsheet) into Logseq.

logseq-plugin-luckysheet 在 Logseq 中嵌入电子表格 Luckysheet。你也可以用它来维护一张 markdown 表格。 Embed Luckysheet (spreadsheet) into Logseq. You can also use it to maint

Jan 1, 2023

A simple gpt-3 integration with Logseq

Readme Using GPT-3 in [[logseq]] is actually remarkably easy. The folks over at OpenAI have built a really powerful model with pretty good documentati

Jul 19, 2022

Plugin that lets you create diagrams from textual representation (aka 'Diagrams as Code') within Logseq

Plugin that lets you create diagrams from textual representation (aka 'Diagrams as Code') within Logseq

Logseq - Diagrams as Code Plugin that lets you create diagrams (and other visualizations) from textual representation (aka 'Diagrams as Code') within

Dec 21, 2022
Comments
  • 操作逻辑优化

    操作逻辑优化

    感谢提供logseq的图床插件。

    请问,我测试结果表明可以上传图片,但是您的插件不会自动修改远程图片的URL,是我的设设置不对吗?

    我对比了Obsidian的这个插件,https://github.com/renmu123/obsidian-image-auto-upload-plugin

    它也使用了Picgo 的本地server进行图像上传,但是操作逻辑更为简单: 支持直接将图片从剪贴板粘贴后,直接改为远程连接。

    不知道是否可以借鉴一下?

    opened by liuyun16 3
  • Pasting images into graph generates error messages

    Pasting images into graph generates error messages

    Hi there, I started getting this error recently when pasting an image into my remote graph. This issue does not occur when I use the slash prompt to upload the same image. Any thoughts? image

    opened by natestell 2
Releases(v0.0.12)
Owner
JJAYCHEN
A Lifelong Learner. M.S. Student(CS) in ECNU.
JJAYCHEN
Upload or Upload & Publish your bundle (apk or aab) to Huawei AppGallery with ConnectApi

appgallery-publisher Upload/Publish your bundle (apk or aab) to AppGallery automatically with appgallery-publisher Usage Single Javascript File Bash F

Mustafa Yiğit 17 Sep 19, 2022
A short project to automatically upload multiple pictures to pinata.cloud

Papel Mache Papel Mache is an app that uploads pictures to IPFS through pinata.cloud Requirements pinata/sdk: 1.1.14 node: 14.17.6 Node Node installat

Cardano Valley 7 Aug 18, 2022
optimize image & upload file to cloud as image bed with tiny image automic.

Rush! 图片压缩 & 直传图床工具 这是一个兴趣使然的项目, 希望 Rush! 能让这个世界的网络资源浪费减少一点点 下载 Downloads 获取最新发行版 功能 Features 拖拽批量压缩图片, 支持格式 jpg/png/gif Drop to optimize, jpg/png/gif

{ Chao } 3 Nov 12, 2022
CloudCrafter CLI is a command-line interface tool that provides templates for common cloud resources to help you get started quickly.

CloudCrafter CLI CloudCrafter CLI is a command-line interface tool that provides templates for common cloud resources to help you get started quickly.

Missio 7 May 5, 2023
Quickly create an interactive HTML mock-up by auto sourcing lorem ipsum/images generators, with minimal html markup, and no server side code

RoughDraft.js v0.1.5 Quickly mockup / prototype HTML pages with auto-generated content, without additional JavaScript or server side code. <section>

Nick Dreckshage 464 Dec 21, 2022
Minificator allows you to quickly minify your files (Images, HTML, CSS, Javascript)

ᗰIᑎIᖴIᑕᗩTOᖇ ~ Demo ~ ?? Description Minification is the process of removing unnecessary elements and rewriting code to reduce file size. These are usu

Raja Rakotonirina 8 Nov 14, 2022
Compare James Webb Space Telescope images to older images.

How much more powerful is the James Webb Space Telescope when compared to Hubble? Find out! More info Want to help out? CONTRIBUTING.md Blog post with

John Christensen 399 Jan 3, 2023
Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries.

Image Zoom (jQuery) Plugin Simple jQuery plugin that will allow users to zoom in your images, perfect for product images and galleries that is less th

Mario Duarte 8 Aug 3, 2022
Easiest 1-click way to install and use Stable Diffusion on your own computer. Provides a browser UI for generating images from text prompts and images. Just enter your text prompt, and see the generated image.

Stable Diffusion UI Easiest way to install and use Stable Diffusion on your own computer. No dependencies or technical knowledge required. 1-click ins

null 3.5k Dec 30, 2022