It would be even better this could be achieved without modifying the style attribute as this creates a lot of mess with WYSIWYG editing. Ideally, as much as possible, this should be achieved with a style sheet that is generated based on the configured image style and that applies the configured styles based on the data-attribute that denotes the image style. At least to me, that would seem a lot cleaner as it would avoid inline styles where possible. Now the question is of course what should happen if both inline styles and an image style are used and if it should be possible to override the defaults of the image style. I guess the WYSIWYG editor should prevent overriding the image style where desirable (by being aware of it) but the user could of course still manually set them.
That said, I remember that I helped creating some rendering code that already updates style attributes during some rendering/parsing steps. So we should first understand again what they're already doing and if they could be extended to deal with this.
This message was sent by Atlassian Jira (v9.3.0#930000-sha1:287aeb6)
If image attachments aren't displayed, see this article.