Limitations for Inserting Images to Google Docs

Gists

When an image is inserted to Google Docs (Spreadsheet, Document and Slides) using the method of insertImage using Google Apps Script, there is the case that the error occurs. The error messages are “server error” and “invalid image data”. Here, I would like to introduce the limitations for inserting images to Google Docs. As the result, it was found that the limitation is due to both the mimeTypes and the area of image rather than the file size.

1. mimeTypes

The mimeTypes which can be inserted to Google Docs are image/jpeg, image/png and image/gif. There conditions are the same for Spreadsheet, Document and Slides.

2. Area of image

Spreadsheet

As the result, it was found that the limitation of area is 1,048,576 pixels^2 for Spreadsheet.

Document and Slides

It was found that the limitations for Google Document and Google Slides are the same. By the experiments, the following results were obtained for Document and Slides.

As the result, it was found that the limitation of area is 25,000,000 pixels^2 for Document and Slides.

References

 Share!