Rethink image upload flow and image model & data while it is uploading #9238
Labels
package:image
squad:core
Issue to be handled by the Core team.
type:improvement
This issue reports a possible enhancement of an existing feature.
Milestone
📝 Provide a description of the improvement
We have a problem with how uploading image is represented and handled in model and how it is handled in conversion. The problem is that an image which is uploading does not have
src
attribute. If such image is then downcasted, there is an image with nosrc
attribute in the HTML. Then, when that's upcasted, the image is gone. It is not converted, because there is nosrc
attribute.This causes problems in some features that rely heavily on the editor state. One example is data compression, which may fail, because the model before and the model after compression may differ if the image was uploading when the compression got triggered.
I have two ideas:
Not sure if the second idea is viable.
After we have some idea how we want to handle uploading and upload-resuming (if we do) we should consider this also for other asynchronously loaded features (not sure if auto-embed is any problematic in this regard, maybe some future features?). It would be good to have one system for all such cases.
Also related: #5159
The text was updated successfully, but these errors were encountered: