logseq icon indicating copy to clipboard operation
logseq copied to clipboard

Pasting larger images from Teams (base64 images) (1200x600) freezes Logseq

Open guerda opened this issue 2 years ago • 11 comments

Search first

  • [X] I searched and no similar issues were found

What Happened?

When pasting larger images (e.g. 1200x600 pixels) in the base64 format (e.g. from websites) into Logseq, it freezes completely. The only way is to kill it and start again. Smaller images (300x300) are not a problem. Waiting doesn't help.

Reproduce the Bug

  1. Open any page in logseq
  2. find an image with large dimensions (e.g. 1200x600)
  3. convert it to base64, e.g. https://www.base64-image.de/ and copy it to the clipboard
  4. Paste it into Logseq

Result: The app freezes and you cannot do anything besides killing the process. close button doesn't do anything.

Expected Behavior

The image is pasted and visible

Screenshots

No response

Desktop or Mobile Platform Information

Windows 10, Logseq 0.9.11

Additional Context

The images are in PNG, but base64 encoded. This happens if you copy some images from websites. Workaround: Paste to any image editor, copy it again

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

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

guerda avatar Jul 27 '23 14:07 guerda

Can confirm on Windows 10 and Logseq version 0.9.17 Also On Android 13 GALAXY S 23 Ultra GALAXY tab s6lite

kennethaar avatar Sep 10 '23 20:09 kennethaar

Is there any update on this? One solution for this would be that you can select that images encoded in base64 will be pasted as image and not as base64 block.

guerda avatar Jan 19 '24 08:01 guerda

Yes it very annoying having to restart Logseq whenever I forget that some apps like Teams does this.

kennethaar avatar Jan 19 '24 08:01 kennethaar

I noticed this problem as well: If I copy images from MS Teams into Logseq, they are pasted as a base64 inline image. I think a fix could to be store the image to disk, as with other images pasted directly into Logseq.

reox avatar Mar 04 '24 07:03 reox

I also ran into this issue while pasting a full OneNote page containing a few large pictures into logseq.

+1 for an option to automatically convert base64 images into separate files.

ApexArray avatar Mar 08 '24 21:03 ApexArray

For me, it looks like this code handles the paste process and should be adapted if possible: https://github.com/logseq/logseq/blob/66e642d0bbf8e423fb83f2ba65de8a73a719a10f/src/main/frontend/handler/paste.cljs#L196

guerda avatar Mar 11 '24 08:03 guerda

Pasted image from Teams, got base64 encoded image instead of expected result of automatically making a file in the assets folder. Also came along with a warning that the block would have to be edited in an external editor. I used the base64 image-block's copy-image option and then pasted that into another block.... which then behaved as expected, creating an asset. Then proceeded to delete the base64 encoded image. This flow should be the default behavior. All the components are apparently already there.

CDeLeon94 avatar Mar 22 '24 13:03 CDeLeon94

Hi There! 👋

We haven't seen any activity on this issue in a while :sleeping:, and we just wanted to make sure that it's still relevant. If you're still experiencing this issue, you might find it helpful to update to the latest version of Logseq. The latest version includes bug fixes and new features that may help to resolve this issue, and you can download it from our website. If updating to the latest version doesn't help, please let us know by adding a comment 💬. We're here to help!

If the issue has been resolved or is no longer relevant, that's great news! 🎉 We'll go ahead and close this issue to keep our backlog organized. Please note that this issue will be closed automatically in 20 days if there is no further activity. If you need more time to resolve the issue or provide more information, please just let us know by adding a comment.

Access additional Logseq 🚀 resources:

  • Forum: https://discuss.logseq.com
  • Blog: https://blog.logseq.com
  • Docs: https://docs.logseq.com

Thanks for your contributions to Logseq! If you have any other issues or feature requests, please don't hesitate to let us know. We always welcome pull requests too!

github-actions[bot] avatar Apr 18 '25 00:04 github-actions[bot]

This issue is still there and I find it strange that it gets autoclosed by stalebot.

I tested it and the behavior is the same as in the beginning. You can reproduce it like this:

  1. Open logseq, any page or log
  2. Upload any large image into https://www.base64-image.de/ to obtain a base64 image (or get it somewhere else
  3. Paste it into logseq.

The app still freezes and makes the handling of that block nearly impossible. It freezes for multiple minutes on a fast PC and you can't do anything about it but to kill it or wait.

I tested it with Logseq 0.10.9 on Fedora Linux.

Please reopen this issue.

guerda avatar May 08 '25 07:05 guerda

I agree, the issue is still present. I go through a couple of steps before copying the image into logseq.

MathiasVDA avatar May 08 '25 07:05 MathiasVDA

This still happens in 0.10.12, please reopen this issue, @tiensonqin

guerda avatar Jun 16 '25 10:06 guerda

Thank you!

guerda avatar Jun 16 '25 16:06 guerda

The behavior is still there in Logseq 0.10.13.

guerda avatar Aug 11 '25 09:08 guerda