New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.
Starred by 2 users

Issue metadata

Status: Fixed
Last visit > 30 days ago
Closed: Nov 2013
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Feature

Sign in to add a comment

Issue 321132: DevTools: Copy image as a data URL

Reported by, Nov 19 2013 Project Member

Issue description

I'd like to copy image to a data URL string.

We could add this option to the context menu in the Resources panel for images, along with the existing
- "Copy Image URL"
- "Open Image in New Tab"

Meanwhile, I have to do the following:

var canvas = document.createElement("canvas");
var ctx = canvas.getContext("2d");
canvas.height = img.height;
canvas.width = img.width;
ctx.drawImage(img, 0, 0);

But it does not always work, for example, with tainted images:

SecurityError: Failed to execute 'toDataURL' on 'HTMLCanvasElement': tainted canvases may not be exported.

Comment 1 by, Nov 26 2013

Project Member
The following revision refers to this bug:

r162691 | | 2013-11-26T14:28:29.336808Z

Changed paths:

[DevTools] Resources: add "copy image as data url" menu item.

It is often convenient to grab image as data url.

BUG= 321132 

Review URL:

Comment 2 by, Nov 26 2013

Status: Fixed

Sign in to add a comment