Using LibreOffice online conversion feature: When converting a file containing image(s) to the html format, the default behavior should be to embed the image(s) (base 64) instead of returning an html file with path references (on the server) to the extracted image files that obviously are not available on client side. Using JODConverter, we have to set the "FilterOptions" to "EmbedImages".
I think bug 63211 made it the non-default, so at least the problems from that bug has to be considered before blindly flipping the default in sw/source/filter/html/wrthtml.cxx:196.
Instead of changing the default behavior for the whole writer, wouldn't be possible to just set the "EmbedImages" property to true when the conversion is done to HTML by a call to the LibreOffice Online API ? The commit comment for 63211 is: "This change re-introduces linked images in HTML export but keeps embedded image export in mailmerge e-Mail function" Wouldn't it be possible to do the same (keeps embedded images) for the LibreOffice Online conversion feature ?
Just for the record, I'd be for embedding images by default too :-) The reason not to do that described in bug 63211 comment 19 was that HTML import in LibreOffice couldn't handle the embedded images - but that's reportedly not the case any more, and we can handle it fine these days. The only other case I've heard of is copy from LibreOffice and paste to Word - but then again, I wonder why text/rtf mimetype is not used in that case (?) But for the export of html, it's much more useful to embed images to have self-contained documents. Ie. I support to change the default to embedding in all cases but where it breaks (the possible copy LibreOffice / paste Word case), than what we have currently: not embedding by default, and embedding only in mail merge.
Samuel, do you (or anyone else from CIB) remember what was the exact scenario where HTML embedding of images broke? I verified that on import we now handle embedded images. So do you have any concerns to flip the default and embed everywhere, except copy&paste? If not, I plan to go ahead with this, loosing images in Online is quite annoying.
(In reply to Miklos Vajna from comment #4) > Samuel, do you (or anyone else from CIB) remember what was the exact > scenario where HTML embedding of images broke? I verified that on import we > now handle embedded images. So do you have any concerns to flip the default > and embed everywhere, except copy&paste? > > If not, I plan to go ahead with this, loosing images in Online is quite > annoying. /me investigating, will report back.
the most relevant bug here is 88038 although there were a couple duplicates; apparently there are users who want to create their websites in Writer, and embedding images is a bit silly in that case. clearly there needs to be a config option whether images should be embedded or not; i/m not sure what the default should be.
(In reply to Michael Stahl from comment #6) > clearly there needs to be a config option whether images should be embedded > or not; i/m not sure what the default should be. Maybe instead of a config option rather a checkbox in the save dialog when "HTML" is selected. With that, we would have covered both automatic conversion (where you can decide with the EmbedImages option) and also manual export. Given that option, I have no strong preference how the default should be.
> Maybe instead of a config option rather a checkbox in the save dialog when > "HTML" is selected. Given that there's already too many checboxes in save-as dialog, it could also be a separate filter: 'HTML (embed images)' vs. 'HTML (link images)' Internally ofc the same export filter, differing just in the EmbedImages option set or not
(In reply to Katarina Behrens (CIB) from comment #8) > > Given that there's already too many checboxes in save-as dialog, it could > also be a separate filter: 'HTML (embed images)' vs. 'HTML (link images)' > Internally ofc the same export filter, differing just in the EmbedImages > option set or not +1, and the distinct filters should help for CLI convert-to users.
Miklos Vajna committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/online/commit/?id=7e9ba2e8c68f6904177272bee9453860224174ec tdf#117077 kit: opt-in to embed images in HTML export
Bug was filed against Online, so there we just opt in. Feel free to file a follow-up bug for LibreOffice itself. I'm not sure what would be a solution that pleases everyone. Separate filters are a great idea, but for 3 boolean flags that means 8 filters. So maybe not. :-)