When I use the ContentControl.insertInlinePictureFromBase64 method to insert a picture, the size of the picture is not respected on Word Online.
I would expect the original size of the picture to be respected, like on Word for Windows.
Word Online inserts the picture with an incorrect size.
https://gist.github.com/jasonhieu1905/53fc88198c6c99ce031bbcbeb4632c94
Our customers select brand images that are designed to be inserted into the header of a Word document. These images work fine when using our add-in on Word for Windows but they are unusable on Word Online. Some of our customers can therefore not use our add-in on Word Online.
Word Online:

Word for Windows:

In our API implementation in Word Online, we assume the picture is png/bmp/jpg. If the base64 encoded stream is a picture of these formats, we didn't see a difference btw Online and Desktop. However, we do see the different behavior in your picture. Could you let us what format of this picture you are trying to insert so that we can do more investigation. We suspect it might be caused by the format of this picture you are using.
Hi @weshi. Thanks for your reply. The picture is a 100x100 pixel jpeg image with 240 dpi:

@htryggva apologies for the lack of response to your latest comment on this issue. Are you still having this problem? @weshi can you please re-engage with the customer on this issue? Thanks!
@kbrandl @weshi Yes, we are still experiencing this problem.
@htryggva thanks for confirming. @weshi can you please resume investigation? Thanks!
@htryggva : this turns out to be a feature difference between Word Online and Desktop. If you save this picture on your local machine, and then try to Insert Picture feature from the UI, you will also see the picture is rendered in different size in Word Online and Word Desktop. The API is working consistently with the UI behavior.
BTW, even in this GitHub page, your picture is shown differently than Word Desktop, but same as Word Online size.
This bug was recently fixed in Word Online, and its on its way to be rolled out (maybe a couple of weeks from today).
Most helpful comment
This bug was recently fixed in Word Online, and its on its way to be rolled out (maybe a couple of weeks from today).