Created
April 5, 2019 06:27
-
-
Save maciejniedzielski/949b619c4a38685dbf7c9628e9e2adb0 to your computer and use it in GitHub Desktop.
console.image()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
console.image = src => { | |
const image = new Image(); | |
image.onload = () => console.log('%c+', `font-size: 0; padding: ${image.height}px ${image.width}px 0 0; background: url(${src});`); | |
image.src = src; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment