When pasting an image that was copied from some (but not all!) web browsers, both Open Office and LibreOffice only insert a link to that image in the ODT document. This bug was first reported in 2004 for OpenOffice, and 10 years onward it hasn't been fixed.
For LibreOffice the bug was finally solved in February 2014.
If linked images are removed from their original location they will not show in the ODT document, and the image content will be irreversibly lost.
Detection is possible by parsing the content.xml file in the ODF container. Images are represented as a draw element, which has an xlink property that defines the actual image location. In the following example (file here) xlink points to an external image on the web:
<draw:image xlink:href="http://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Luftschiff_Montgolfier.jpg/499px-Luftschiff_Montgolfier.jpg" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
On the other hand, in the example below (file here), the image is embedded in directory Pictures inside the ODF container:
<draw:image xlink:href="Pictures/10000000000001F300000257D006F0C7.png" xlink:type="simple" xlink:show="embed" xlink:actuate="onLoad"/>
As far as I'm aware no tools exist that perform this check, but it would be easy to create such a tool.
When pasting an image with LibreOffice writer, always use Paste Special..., and then select Bitmap.
It would be fairly straightforward to write a software tool that fixes ODT documents with non-embedded images. This would involve the following steps:
- Check all draw elements in content.xml for external links
- Download any externally referenced images (if they are still available!)
- Store downloaded images in designated folder in ODT container
- Update link in each draw element to location of downloaded image
Needless to say this only works if the linked images are still accessible. Also, some images may have changed since the referring document's creation, in which case the fixed document will not look like it was originally meant to.
- http://www.opf-labs.org/format-corpus/office/wordprocessing/odt/demoLibreOfficeImagePasteBug.odt - image as link (LibreOffice default)
- http://www.opf-labs.org/format-corpus/office/wordprocessing/odt/demoLibreOfficeImagePastedAsBitmap.odt - image pasted as bitmap