Hello Tracey,
If you set the width of the image when you are inserting it, it will get properly exported in the HTML.
As for why the approach you mention is not applicable: Spans can contain only text , so you cannot add an image to a span. The document is split into spans according to its formatting - adjacent spans with similar formatting are merged and vice versa, when you have some text with uniform formatting and change the font size, fore color or any other property of a part of it, the span gets split into 2 or 3 others. That is why it won't make much sense to set a Height or Width to a span.
In my opinion, the best approach would be to set the width and height of the image at the time of the insertion, like this:
The images will be exported with these setting and will be imported back properly.
If you are loading external HTML files that can contain larger images, you can traverse the document, find them and reset their size like this:
I hope that helps.
Greetings,
Iva
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items