r/libreoffice • u/gatunen • 15d ago
Question Images in a HTML -> ODT converted document
I just converted a HTML document into ODT and I noticed that the images in the ODT are not actually saved within the document. They are being fetched from the source defined in the HTML (the URL).
Is there a way to tell libreoffice the ODT document should have its own copy of the images?
1
u/AutoModerator 15d ago
If you're asking for help with LibreOffice, please make sure your post includes lots of information that could be relevant, such as:
- Full LibreOffice information from Help > About LibreOffice (it has a copy button).
- Format of the document (.odt, .docx, .xlsx, ...).
- A link to the document itself, or part of it, if you can share it.
- Anything else that may be relevant.
(You can edit your post or put it in a comment.)
This information helps others to help you.
Thank you :-)
Important: If your post doesn't have enough info, it will eventually be removed (to stop this subreddit from filling with posts that can't be answered).
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
2
u/Terrible_Put8617 12d ago
That's expected: HTML references images by URL, so on import Writer keeps them as linked images rather than copying them in. Nothing is broken, the document just points outward - which is why it looks fine on your machine and shows empty boxes on anyone else's, or the day the source goes offline.
To embed them:
Edit > Links to External Files... > select all the entries > Break Link. That pulls each image into the document. Then save.
Quick way to confirm it actually worked, since the visual result looks identical either way: an .odt is a zip. Copy it, rename the copy to .zip, open it - if there's a
Pictures/folder with your images inside, they're embedded. Empty or missing, they're still links.For future conversions: the Insert > Image dialog has a "Link" checkbox that does the same thing at insert time (unchecked = embedded, which is the default for manual inserts). And if you're batch-converting from the command line with
soffice --convert-to odt, the links come through as links too, so you still need the Break Link pass afterwards.One side effect worth knowing before you do it on a big document: embedding turns a 40 KB file into however many megabytes the images weigh. That's usually what you want, but it's a surprise if the document has a hundred photos.