Problem with images in API

Problem with images in API

We are using the Zoho Writer API on our site. When a user clicks "Save" in Zoho Writer, his document is saved as an ODT binary in our database. When the user clicks on a link in our site indicating that he wants to edit his doucument further, that ODT binary code is saved as an ODT file, which is then imported into Zoho Writer.

We have been having some trouble with images. When a document with an image is saved the first time (having been either inputted directly in Zoho Writer or imported from Microsoft Word), it saves properly in the ODT binary, and thus, the image shows up properly when the document is reopned in Zoho. However, once that document (imported from an ODT) is saved again, it does not save properly to our database, and when we open it for the third time, we find that the image is missing.

This seems to be happening only with larger image files, and not with very small ones. Why is this?