As mentioned, this is a side effect of using percentages to scale images. While we do allow this, I don't think it's working how people expect or are intending to use it.
So questions for people (and
@Mouth in particular):
1. Have you tried to resize images using a percentage width (or height)? Note that you'd have to explicitly type this in as dragging to resize in the RTE will set an absolute value.
2. If you did set something like a 50% width, what did you intend/expect that to mean? 50% of the original image size? 50% of the width of the editor/message display area?
The key here is that the way HTML and CSS work, if you set a 50% width, you're not requesting 50% of the image's natural size. You're saying 50% of the width of the
parent element, regardless of image size. Try it with a small image and you'll see it scale the image up (at least in the RTE). It seems to me like this is unlikely to be the intent in most cases, at least in the context of a post.
The big problem is that, independent of aligning/floating an image, percentage scaling doesn't work as expected when viewing a post (though it might appear to do so in the RTE). If you have a particularly large image, it might appear to do what you expect, but with any image that doesn't naturally take up the full width where the message is displayed, it behaves unexpectedly. This is because there's a wrapper element and, for the browser to avoid a catch-22, this element gets sized based on the image's natural width. The image within is then scaled down to 50% of that. So actually, in this case, we do sort of scale the image to 50% of its natural size, though the containing element is still the full image size, which triggers some unexpected behaviors (most notably, strange float behavior).
So this may need to be something we explicitly drop support for given the significant variation in behaviors. It certainly shouldn't be common because it requires explicitly typing in a percentage scaling, but if you've used it intentionally, please let us know. The potential change to existing posts is a concern.