Placing large image in Word Online not working

AG 1 Reputation point
2022-12-01T10:09:15.07+00:00

I am trying to place a large jpg image (size 17.15 MB) in Word Online. The code appears that the image was placed successfully, but it doesn't place the image in the document and there are no error messages. It is working properly in Word Desktop.

let options = {coercionType: Office.CoercionType.Image};  
Office.context.document.setSelectedDataAsync(base64, options, function(obj){  
  console.log('obj', obj)  
  context.sync().then(function(){  
    console.log('complete')  
  }, function(err){  
    if(err){console.log('failed')}  
  });  
});  

obj is returning:

status: "succeeded"  
value: {}  

The code places properly for a smaller image and on Desktop. Is there another way to check if the image placed properly or an error message?

JavaScript API
JavaScript API
An Office service that supports add-ins to interact with objects in Office client applications.
866 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,482 questions
Word Management
Word Management
Word: A family of Microsoft word processing software products for creating web, email, and print documents.Management: The act or process of organizing, handling, directing or controlling something.
892 questions
0 comments No comments
{count} votes