← Back to release summary

Clipboard: Preserve PNG metadata

Category
User input
Type
Chromium catches up
Status
Enabled by default (Chrome 96)
Intent stage
Dev trials

Summary

Read unsanitized PNGs from the system clipboard. This will apply to both DataTransfer and the Async Clipboard API (navigator.clipboard.read()).

Motivation

Currently, reading PNGs from the system clipboard involves sanitizing the image by stripping its metadata. There is a strong argument that images from the system clipboard should not be sanitized on read, and this behavior is inconsistent with other major browser vendors and other forms of importing images, such as <input type="file">. See https://crbug.com/1177229 for further explanation. Additionally, this significantly reduces the cost of pasting images from the clipboard in the vast majority of use cases (14x speed-up reading very large PNGs in limited testing).

Standards & signals

Explainers: https://docs.google.com/document/d/1qZonN0xhfkuAOV58WOAMcPXjOB7uCfms3tf_ZDXNDks/edit?usp=sharing

View on chromestatus.com