logseq / logseq/logseq

Images pasted from clipboard are not displayed nor saved in /assets folder

Open
#12,039 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
45k
Forks
2.8k
Avg merge
1d 22h
Merged PRs (30d)
105

Description

### Search first

- [x] I searched and no similar issues were found

### What Happened?

Images are not displayed, nor saved when pasting a screen capture or a section capture from clipboard.

Images known to be present in the /assets folder will also fail, showing the following icon:
Also, images in the assets folder being dragged and dropped to the browser directly to the logseq block, will fail in the exact same way.

Image

### Reproduce the Bug
Server: Logseq self hosted as a docker container on a separate linux server.
Client: Web Browser

1. On MS Edge Web browser (Windows 11), Press PrntScreen button to enable screen capture, select area to capture
2. Paste it in logseq journal on your web browser.
3. Observe that the following is pasted:

Image
(your id may vary)

4. Click to the next bullet on the journal, observe how the text disappears and no image is shown
5. Observe that the file is also not present in /assets folder, even though it has write permissions to it.
6. Confirm that the screen capture can be pasted successfully on any other software, such as OneNote or Krita.

### Expected Behavior

1. Automatically upload the file to the /assets folder
2. Display the image in Logseq.

### Screenshots

The following is shown when pasting from the clipboard

Image

The following is shown when clicking on the next bullet point:

Image

The following is shown when the link is updated manually to a file known to be existent in the /assets folder:

Image

### Desktop or Mobile Platform Information

OS: Windows 11, desktop.
Browser (Test 1): Web Client using MS Edge web browser.
Browser (Test 2): Google Chrome on Linux ElementaryOS.
Server: Logseq self hosted as a docker container on a separate linux server.

Method: Standard windows Snapshot capture.

### Additional Context

This same procedure works successfully as expected when using Logseq App however, images will not show when opening the same page from the web client.

### Are you willing to submit a PR? If you know how to fix the bug.

- [x] I'm willing to submit a PR (Thank you!)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure in the web client using clipboard paste and dragging an existing image from the /assets folder, comparing it with the working Logseq App behavior. Trace the web client's image upload and display handling; done means pasted images are saved to /assets and displayed, and existing assets render when opened through the web client.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
backend, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.