When selecting a new image, the Backdrop dialog doesn't provide the dimensions.
The Editor Image Dimension Sync module fixes that BTW, but as long as it's not installed (and I wouldn't want declare it as dependency), images in content end up with empty width/height attributes.
It's possible to do an img.onload before building the image markup in the plugin, but that causes a notable and pretty disturbing delay, causing an existing (to replace) image to still be visible, until the dimensions of the replacement image got determined.
Not sure if it's possible to update an image already inserted into the editor with some sort of API help.
When selecting a new image, the Backdrop dialog doesn't provide the dimensions.
The Editor Image Dimension Sync module fixes that BTW, but as long as it's not installed (and I wouldn't want declare it as dependency), images in content end up with empty width/height attributes.
It's possible to do an img.onload before building the image markup in the plugin, but that causes a notable and pretty disturbing delay, causing an existing (to replace) image to still be visible, until the dimensions of the replacement image got determined.
Not sure if it's possible to update an image already inserted into the editor with some sort of API help.