Case ce-0103-image-paste-chrome · Scenario scenario-image-insertion

Pasting image from clipboard inserts as base64 data URL in Chrome

OS: Windows 11 Device: Desktop or Laptop Any Browser: Chrome 120.0 Keyboard: US Status: draft
image paste base64 chrome

Phenomenon

When pasting an image from clipboard in Chrome, the image is inserted as an <img> tag with a base64 data URL. This can create very large HTML and may cause performance issues.

Reproduction example

  1. Copy an image to clipboard (e.g., screenshot)
  2. Focus a contenteditable element
  3. Paste (Ctrl+V)

Observed behavior

  • Image is inserted as <img src="data:image/png;base64,...">
  • Base64 data URL can be very long (hundreds of KB to MB)
  • HTML becomes bloated
  • May cause performance issues with large images

Expected behavior

  • Image should be inserted but data URL size should be manageable
  • Or option to upload image to server instead
  • HTML should not become excessively large

Browser Comparison

  • Chrome/Edge: Inserts as base64 data URL (this case)
  • Firefox: May not support image pasting or handle differently
  • Safari: Behavior varies

Notes and possible direction for workarounds

  • Intercept paste event and handle images separately
  • Upload image to server and use URL instead of data URL
  • Compress image before inserting
  • Limit image size or prompt user for upload option
Clipboard
[Image: screenshot.png]
Image in clipboard
❌ After Paste (Bug)
Inserted as Base64 data URL, HTML very large (hundreds of KB ~ MB)
vs
✅ Expected
Expected: Use server URL or appropriate size management

Browser compatibility matrix

This matrix shows which browser and OS combinations have documented cases for this scenario. The current case is highlighted. Click on a cell to view other cases.

Current case
Confirmed
Draft
No case documented

All variants (detailed table)

Complete list of all cases for this scenario with full environment details.

Case OS Device Browser Keyboard Status
ce-0103-image-paste-chrome Windows 11 Desktop or Laptop Any Chrome 120.0 US draft
ce-0154-image-drag-drop-position Windows 11 Desktop or Laptop Any Chrome 120.0 US draft

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Windows 11
Device: Desktop or Laptop Any
Browser: Chrome 120.0
Keyboard: US
Your environment
Sample HTML:
Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.

Comments & Discussion

Have questions, suggestions, or want to share your experience? Join the discussion below.