How do I configure defaults so content copied from a web browser embeds images

Ie, I don’t want remote links in my document, I want the images embedded.

Version: 7.0.5.2
Build ID: 64390860c6cd0aca4beafafcfd84613dd9dfb63a
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3

What you copy from the web is usually some form of HTML where images are links anyway. This contents is pasted “as is”. Images remain links. If you want to embed images, you must follow a more complex manual procedure where you paste separately the text part and graphical material after retrieving images to store them locally.

Thanks. :slight_smile:

How would I make a feature request so Writer can optionally default to breaking the link and embedding the image?

Alternatively, I’ve seen an option to trigger a macro on certain image events. How are these macros made? Maybe I could break the link on the image load event.

To embed an image from a link requires many operations not related at all with formatting text: identifying a link (IMHO already in present code), retrieving the resource from the web (maybe some code may be reused because it is needed to display the image any way), storing it on the local computer (new code but where in the file system? this may require a new dialog to ask user for a location).

I don’t personally think it fits in Writer (or more generally LO) workflow. So there is little chance such a feature request might be accepted. But have a try on LO Bugzilla. To clearly identify your request, prefix the title with [FEATURE REQUEST] so that it is obviously not a bug report. Be as descriptive as possible so that developers understand your proposal and can evaluate feasibility. And a last warning: there are so many pending bugs, some of which really serious, and so few programmers don’t expect a quick implementation if accepted.

Thanks Hrbrgr and ajlittoz, all that all seems reasonable, but I’ll try to explain how I’m understanding the problem,

I’m assuming the current implementation does this:

  • an image link is pasted into a document from the clipboard.
  • the image link is added to a persistent document model (to be saved to disk).
  • Writer downloads image data and adds it to a dynamic document model in memory or tmp file.
  • the document view displays the image with default or inferred style.

At this point, I can do the following operation:

  • Edit | Links to External Files…
  • select the source link(s) I want to embed.
  • select Break Link

The image data, once downloaded, already exists in the data owned by the app instance. When the link breaking operation is complete, the image data is now persistent and embedded in the document and the image link deleted.

My suggestion is that the link breaking operation be performed automatically, when the clipboard data is pasted. I don’t see why any low level coding would be required to perform an operation that is already available from the UI.