tinymce / tinymce/tinymce

Resizing an image causes it to be downloaded again.

Open
#5,711 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

browser: chrome plugin: imagetools status: escalated status: verified type: bug
Dominant language
TypeScript
Stars
16.3k
Forks
2.3k
PR merge metrics
No merged PRs in 30d

Description

What is the current behavior? Describe the bug
After inserting an image into the editor, every time you resize the image, tincymce re-downloads the image (verified by observing the requests in the network tab in chrome dev tools).
Ideally, this would not be a problem for images that are cached. However, In our case the image is not cached since it has to be validated

Steps to reproduce
This issue is reproducible on the official image-tools demo.
Just insert any image, and resize it. Observe the requests in the network tab in developer tools. Notice that every time you resize the image, it is downloaded again.

What is the expected behavior?
I'm not sure if this behavior is by design, but the expected behavior is that the image should get downloaded only once, i.e. when it has been inserted. After that, if you are merely resizing it, it should not be downloaded over again.
(I understand that if I move it around in the editor, then the image would get downloaded again, since that might involve recreating the img tag)

Which versions of TinyMCE, and which browser / OS are affected by this issue? Did this work in previous versions of TinyMCE?
Latest version (5.2.2?), on Google Chrome, Win 10.
Not verified with previous versions.

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

Start with the image-tools demo and reproduce the issue while watching Chrome DevTools network requests. Trace the image-resizing flow in the TinyMCE source, then verify that resizing an inserted image causes only the expected initial download and does not trigger repeated downloads.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, typescript
Domain
frontend, performance
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.