As it turned out, the CKEditor sets the image size in the ‘style’ attribute and not as separate width and height attributes. This is ignored when the document is generated with a result that the image is displayed in the original format and not the request size.
Mendix released a new version 2.4.4 of CKEditor where you have the option to use the width/height attributes or the style attribute for images. This fixed the issue.
Note that only the smallest value of a provided image size is honoured.
When you set the image size to 100 x 600, it will generate a document with the image size of 100 x (the height per the correct aspect ratio).
CKEditor will show the ‘stretched’ version in the editor but this is not how the template generator will produce the output.