console.image icon indicating copy to clipboard operation
console.image copied to clipboard

Doesn't work in Chrome any more :(

Open daniellmb opened this issue 10 years ago • 17 comments

:cry:

daniellmb avatar Aug 07 '15 22:08 daniellmb

:scream: What version/OS you running? The demo is still working for me on Version 44.0.2403.130 (64-bit) OSX Yosemite!

adriancooney avatar Aug 07 '15 22:08 adriancooney

Chrome 45.0.2454.26 beta (64-bit) OSX 10.9.5

It looks like the code runs without errors but Chrome isn't rendering the BG image. It'll render a BG color, but not an image (tried both a url and base 64 encoded string).

screen shot 2015-08-10 at 10 06 14 am

daniellmb avatar Aug 10 '15 17:08 daniellmb

Doesn't work in Chrome - Version 45.0.2454.85 (64-bit) / OSX 10.10.5

k4rm3l0 avatar Sep 04 '15 13:09 k4rm3l0

Unfortunately it appears the fun is over :(

https://code.google.com/p/chromium/issues/detail?id=495643

I believe the only way to get around would be to draw pixel-by-pixel... bonus of that would be that it would work in Firefox and Opera too ;) I think it would be intense on large images though.

mudcube avatar Sep 18 '15 19:09 mudcube

Just tried to do the pixel-by-pixel method; it's super slow, and could not get pixels to align properly.

Better option might be to write a DevTools extension;

https://developer.chrome.com/extensions/devtools

mudcube avatar Sep 18 '15 20:09 mudcube

:sob:

jondcallahan avatar Sep 19 '15 03:09 jondcallahan

Yeah this line kills it: https://src.chromium.org/viewvc/blink/trunk/Source/devtools/front_end/console/ConsoleViewMessage.js?pathrev=197345#l797

There's no way to specify an image without using url(...) is there? Even a base64 data uri uses that. :(

daniellmb avatar Sep 19 '15 20:09 daniellmb

the saddest day

kumavis avatar Jan 09 '16 01:01 kumavis

Think we might be back in business.

https://docs.google.com/document/d/1FTascZXT9cxfetuPRT2eXPQKXui4nWFivUnS_335T3U/preview

adriancooney avatar Jan 30 '16 13:01 adriancooney

console.log([
"     .-.    Since it's not enabled by default,",
"    /_ _\\   I think I shall just use ASCII Art.",
"    |o^o|  /",
"    \\ _ /",
"   .-'-'-.",
" /`)  .  (`\\",
"/ /|.-'-.|\\ \\",
"\\ \\| (_) |/ /  .-\"\"-.",
" \\_\\'-.-'/_/  /[] _ _\\",
" /_/ \\_/ \\_\\ _|_o_LII|_",
"   |'._.'|  / | ==== | \\",
"   |  |  |  |_| ==== |_|",
"    \\_|_/    ||\" ||  ||",
"    |-|-|    ||LI  o ||",
"    |_|_|    ||'----'||",
"   /_/ \\_\\  /__|    |__\\"
].join("\n"));

daniellmb avatar Jan 30 '16 15:01 daniellmb

@daniellmb don't lose hope just yet. I think we're onto something because these custom formatters are awesome. Everybody will probably in the near future have them turned on and we'll be there to pounce.

screenshot 2016-01-30 15 16 21

adriancooney avatar Jan 30 '16 15:01 adriancooney

WhatWG is working to make some more standardizations surrounding window.console (good place to weigh in on console.image and why it's important): https://github.com/whatwg/console

mudcube avatar Jan 31 '16 20:01 mudcube

"As far as there are multiple different ways to detect opened devtools, (and we don't aim to fight with them ATM), closing this as WontFix."

from: https://bugs.chromium.org/p/chromium/issues/detail?id=495643

hoorayy!! 🎉🎉🎉

leocabral avatar Dec 18 '16 23:12 leocabral

The demo works with Version 63.0.3239. Maybe it's time to close this issue.

bharatramnani94 avatar Dec 28 '17 10:12 bharatramnani94

https://bugs.chromium.org/p/chromium/issues/detail?id=1350078 https://bugs.chromium.org/p/chromium/issues/detail?id=1223475 https://github.com/GoogleChrome/developer.chrome.com/issues/3386

firecrauter avatar Sep 01 '22 11:09 firecrauter

Is there an alternative way to display an image in the console nowadays?

leobenkel avatar Feb 03 '23 10:02 leobenkel

@leobenkel This method still works

mpaw avatar Aug 21 '23 03:08 mpaw