Bug 269662 - Copy Image results in URL paste rather than Image pasted
Summary: Copy Image results in URL paste rather than Image pasted
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Images (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-02-17 21:39 PST by webkit
Modified: 2024-02-24 21:40 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description webkit 2024-02-17 21:39:34 PST
Currently, clicking "Copy Image" results in both the image AND the image URL getting copied to the clipboard. While on first thought it would seem like this is beneficial, when you actually go to paste, the OS (at least macOS) pastes the image URL rather than the actual image. This is not ideal because one could use the Copy Image Address if that was the intention.

Other browsers (i.e. Chrome) copy only the image and not the image url when copying the image.
Comment 1 Karl Dubost 2024-02-21 04:42:10 PST
Thanks for the report,

It depends on the context of the paste no?

copy Image on a wikipedia photo:
and paste in this textarea:

Safari  https://en.wikipedia.org/wiki/File:Caf_hardman.jpg
Firefox [nothing]
Chrome  [nothing]

The behavior of Safari seems useful.

I guess it makes easier for people to have a behavior where the form is not clear if it will take only text or also the full image.
Comment 2 webkit 2024-02-21 23:50:38 PST
You're right that it is more dynamic in the case that you're pasting to somewhere that does not accept the full image -- however, it is with the caveat that it kneecaps the functionality that most people use it for. 

It is usually fairly obvious when the paste destination will accept text only, and is it not explicitly for that case that we have the "Copy Image Address" option?
Comment 3 Alexey Proskuryakov 2024-02-23 13:51:50 PST
Could you please provide some specific scenarios where this causes poor user experience? If it's just one or two cases, that could be considered a bug on the receiving end that they prefer string to image.

In particular, coming an image from Wikipedia in Safari and pasting to Messages results in the image being pasted, not the URL. So I do not how to reproduce a misbehavior.
Comment 4 Radar WebKit Bug Importer 2024-02-24 21:40:14 PST
<rdar://problem/123580826>