Skip to content

Pasting certain images in the Draw.io editor breaks the diagram #6116

@tn-jreyes

Description

@tn-jreyes

Describe the Bug

Hello! Sorry if this has been asked before, I haven't found anything like it in the issues. I've encountered a case of Draw.io diagrams being completely lost on save (the diagram becomes blank and can't be edited again, the only option is to delete it from the page and recreate it). It appears to happen after I paste an image in the diagram (I've seen it happen with screenshots and with images copied from Google Images), but not every image causes the issue.

After the problem, the diagram ends up looking like this, a wide and not very tall blank block:

Image

The screenshot doesn't capture the mouse cursor when hovering over the diagram's block, but it's the not-allowed cursor that looks like 🛇. Furthermore, the block can't be double-clicked to edit the diagram anymore, so it isn't possible to further edit it. The only thing that can be done is to delete the diagram altogether (the latest version saved before the image was inserted is saved in the Diagrams Manager so not everything s lost, but still)

I believe (but I'm not sure at all!) that the issue may be related to the size of the pasted image. I haven't seen it happen with small images such as logos, which can be say 50x50px. But it has happened with larger images, such as a whole screen's capture which can be >1000x1000. Or perhaps it isn't the resolution but the file size, which should be related anyways.

Steps to Reproduce

  1. Create a page, insert a diagram
  2. Paste e.g. the image stored at https://codeberg.org/bookstack/website/media/branch/main/static/images/2025/11/api_quick_nav.png inside the diagram (or a screenshot of the entire screen, or some other large-ish image), select either Actual Size or Resize (I've had the issue with both options)
  3. Save the diagram

Expected Behaviour

The diagram should save normally and the newly pasted image should appear in the page

Screenshots or Additional Context

Here's a video of the whole interaction: creating a diagram, pasting the image, saving the diagram, and then it fails

Screencast.from.2026-04-23.15-24-38.webm

and a screenshot of how it ends up (afterwards it can't be interacted with anymore, double-clicking the diagram doesn't work)

Image

Browser Details

Brave 1.89.137 (Chromium 147.0.7727.102) on Ubuntu 24.04

Exact BookStack Version

v26.03.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions