Why does Google Chrome and Safari copy image as PNG representation?

I thought that Chrome copies a source image to clipboard, but it creates a PNG representation and pastes the representation to a clipboard when I use a context menu button 'Copy Image'.

enter image description here

I checked this in Safari and received same image.

Why does browser copy PNG instead of source image?


Solution 1:

I checked and found the same behavior : An image can be saved as-is, but copying to the clipboard is only in PNG format.

This is a question of implementation: The new Asynchronous Clipboard API is currently being implemented in all major browsers.

In Chrome, it started out with support for text/plain and image/png. In November 2020 was added text/html support for async clipboard api, and later in July 2021 Clipboard API: Svg.

More formats will surely follow, but for the moment JPG images are converted to PNG on the clipboard. This is a strange and narrow-minded implementation, but that's the current situation in Chrome. For example, Firefox does not have this limitation.