Bug 156509 - Image copied from browser is not shown in Writer
Summary: Image copied from browser is not shown in Writer
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.4.7.2 release
Hardware: All Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-28 21:26 UTC by Olivier
Modified: 2023-09-12 06:38 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Document after "paste" (10.54 KB, application/vnd.oasis.opendocument.text)
2023-07-28 21:27 UTC, Olivier
Details
Screenshot (document after "paste") (6.84 KB, image/png)
2023-07-28 21:28 UTC, Olivier
Details
Document after "break link" (10.07 KB, application/vnd.oasis.opendocument.text)
2023-07-28 21:29 UTC, Olivier
Details
Screenshot (after "break link") (3.44 KB, image/png)
2023-07-28 21:30 UTC, Olivier
Details
screenshot of example_2023.odt (129.41 KB, image/png)
2023-07-30 02:27 UTC, danomois
Details
les techniques page copy (232.45 KB, image/png)
2023-07-30 02:38 UTC, danomois
Details
4 cases of image insertion (56.19 KB, application/vnd.oasis.opendocument.text)
2023-07-30 11:55 UTC, Olivier
Details
Firefox Copy Paste (156.79 KB, image/png)
2023-08-06 03:36 UTC, danomois
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier 2023-07-28 21:26:47 UTC
Description:
When I copy from my web browser to lowriter, the images are not copied.


Steps to Reproduce:
(1) I select a portion of a web page in my web browser ; I hit CTRL+C ; I paste in lowriter (CTRL+V) => "example_2023.odt"
(2) I observe that the image is not shown in lowriter (despite the link is correctly stored in lowriter)
(3) I run "Edit > External Links > Break Link" on that image => "example_2023 (after Break Link).odt"
(4) The image is still not shown and is not integrated to the content of the file.

Actual Results:
Images not displayed.

Expected Results:
Images should be displayed, no?


Reproducible: Always


User Profile Reset: No

Additional Info:
---
Comment 1 Olivier 2023-07-28 21:27:56 UTC
Created attachment 188619 [details]
Document after "paste"
Comment 2 Olivier 2023-07-28 21:28:54 UTC
Created attachment 188620 [details]
Screenshot (document after "paste")
Comment 3 Olivier 2023-07-28 21:29:33 UTC
Created attachment 188621 [details]
Document after "break link"
Comment 4 Olivier 2023-07-28 21:30:01 UTC
Created attachment 188622 [details]
Screenshot (after "break link")
Comment 6 m_a_riosv 2023-07-28 23:54:04 UTC
Have you enabled?
Menu/Tools/Options/LibreOffice Writer/View – Display – Images and objects.
Comment 7 Olivier 2023-07-29 00:02:30 UTC
Yes, of course.
Comment 8 m_a_riosv 2023-07-29 00:07:52 UTC
Menu/View/Images and charts?
Comment 9 m_a_riosv 2023-07-29 00:11:20 UTC
If it doesn't work either,
Please test in safe mode, Menu/Help/Restart in Safe Mode
Comment 10 Olivier 2023-07-29 09:15:27 UTC
(In reply to m.a.riosv from comment #8)
> Menu/View/Images and charts?

Yes of course. 
If I insert an image file from my computer in that same document, I can see it.
The problem, as described, is with image links.
Comment 11 Olivier 2023-07-29 10:37:47 UTC
(In reply to m.a.riosv from comment #9)
> If it doesn't work either,
> Please test in safe mode, Menu/Help/Restart in Safe Mode

"Safe Mode" didn't help: the image is still not visible.
Comment 12 danomois 2023-07-30 02:27:34 UTC
Created attachment 188648 [details]
screenshot of example_2023.odt
Comment 13 danomois 2023-07-30 02:37:18 UTC
Olivier,

This is interesting - in both versions below when I open your file example_2023.odt the image of the partially stitched shoe is there.

I attached a screenshot just so you can see it.

I also copied the same image from the website myself in a blank writer document and it shows up as you would expect.

Given the impact of French fashion on the world I take this very seriously ;).

Maybe I can ask a follow up: I attached an example of how I highlighted the webpage image prior to CTRL+C - is that how you were selecting the image? Like dragging your mouse over the area then just copying it?

Because if so I'm just not sure what to say - maybe it's a version bug and if you download the latest it will cure it ... but I'd hate to have something so basic be an ongoing bug because like - this is something that needs to work.

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Ubuntu package version: 4:7.5.5~rc2-0ubuntu0.22.04.1~lo1
Calc: threaded

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 77fca616e0bd79e0b405fd0b3543cf8e94e15df3
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 14 danomois 2023-07-30 02:38:15 UTC
Created attachment 188649 [details]
les techniques page copy
Comment 15 Olivier 2023-07-30 11:54:04 UTC
> I also copied the same image from the website myself in a blank writer
> document and it shows up as you would expect.

Which browser did you use?
Note: I can copy-paste images from other web pages correctly (see attachment).

> Maybe I can ask a follow up: I attached an example of how I highlighted the
> webpage image prior to CTRL+C - is that how you were selecting the image?
> Like dragging your mouse over the area then just copying it?

Yes, I did so.

After selection, can you print the output of the lines below?
$ xclip -selection clipboard -t TARGETS -o
$ xclip -selection clipboard -t text/html

For me, with FireFox, for the shoe fabrication page, I get:
$ xclip -selection clipboard -t TARGETS -o
TIMESTAMP
TARGETS
MULTIPLE
SAVE_TARGETS
text/html
text/_moz_htmlcontext
text/_moz_htmlinfo
UTF8_STRING
COMPOUND_TEXT
TEXT
STRING
text/plain;charset=utf-8
text/plain
text/x-moz-url-priv

$ xclip -selection clipboard -t text/html
<meta http-equiv="content-type" content="text/html; charset=utf-8"><h2>Le cousu Mocassin <a name="mocassin"></a></h2>



                                            <table class="paragraph_text" cellspacing="0">
                                                        <tbody><tr>
                                                                <td><p> </p>
<p><img id="iimg_360826635" alt="Le cousu Mocassin" src="https://www.chaussuredefrance.com/export/sites/default/fr/_data/_media/images/le_monde_de_la_chaussure/les_techniques_de_fabrication/cousu_mocassin_ctc.jpg_1827635306.jpg" width="300" height="304">  </p></td></tr></tbody></table>

For the flower page, which works well for copy-paste, with FireFox, I get:
$ xclip -selection clipboard -t text/html -o
<meta http-equiv="content-type" content="text/html; charset=utf-8"><a href="https://commons.wikimedia.org/wiki/File:Phyteuma_orbiculare.JPG?uselang=fr" class="mw-file-description"><img src="https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Phyteuma_orbiculare.JPG/200px-Phyteuma_orbiculare.JPG" decoding="async" class="mw-file-element" srcset="//upload.wikimedia.org/wikipedia/commons/thumb/7/77/Phyteuma_orbiculare.JPG/300px-Phyteuma_orbiculare.JPG 1.5x, //upload.wikimedia.org/wikipedia/commons/thumb/7/77/Phyteuma_orbiculare.JPG/400px-Phyteuma_orbiculare.JPG 2x" data-file-width="1944" data-file-height="2592" width="200" height="267"></a>
Comment 16 Olivier 2023-07-30 11:55:45 UTC
Created attachment 188651 [details]
4 cases of image insertion
Comment 17 danomois 2023-08-06 03:35:31 UTC
Olivier,

Sorry for the delayed response. 

First I was using Chrome. I do not have Chromium as a browser.

I recreated the copy paste in Firefox and it worked as expected - pasting the image as a JPEG. I attached the 'Firefox Copy Paste' to show you.

I entered your xclip commands and got 1 of 2 outputs as below - though I'm not familiar with xclip I am afraid.

All in Olivier I think this might be beyond my ability to QA.

xclip -selection clipboard -t TARGETS -o
TIMESTAMP
TARGETS
SAVE_TARGETS
MULTIPLE
STRING
UTF8_STRING
TEXT
text/html
text/plain
text/plain;charset=utf-8

xclip -selection clipboard -t text/html
*my shell did not produce a response to this
Comment 18 danomois 2023-08-06 03:36:32 UTC
Created attachment 188799 [details]
Firefox Copy Paste
Comment 19 Buovjaga 2023-09-12 06:38:48 UTC
(In reply to Olivier from comment #5)
> Internet source page:
> https://www.chaussuredefrance.com/sites/fr/le_monde_de_la_chaussure/
> Lachaussure/les_techniques_de_fabrication.html

The link didn't work anymore. I tried some archive.org snapshots, but they did not have the images.

I found the same content in https://www.chaussuredefrance.com/la-chaussure but they changed the structure compared with the html seen in your comment 15. It pastes as an embedded image in my case at least.

Arch Linux 64-bit, X11
Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f5bcc34580d02f92af01963155f2d54776a5249b
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 12 September 2023