Skip to content

Instantly share code, notes, and snippets.

@greggman
Created February 20, 2026 18:23
Show Gist options
  • Select an option

  • Save greggman/e3b1c61bcc8825406c5942fadeb89d55 to your computer and use it in GitHub Desktop.

Select an option

Save greggman/e3b1c61bcc8825406c5942fadeb89d55 to your computer and use it in GitHub Desktop.
image-rendering
.outer {
display: flex;
text-align: center;
& > div {
border: 1px solid #333;
margin: 0.5em;
}
img {
display: block;
margin: 0.5em;
}
}
<div class="outer">
<div>
<img src="https://i.imgur.com/fqgm8uh.png" style="width: 128px; height: 128px">
<caption>default</caption>
</div>
<div>
<img src="https://i.imgur.com/fqgm8uh.png" style="image-rendering: pixelated; width: 128px; height: 128px">
<caption>pixelated</caption>
</div>
<div>
<img src="https://i.imgur.com/fqgm8uh.png" style="image-rendering: crisp-edges; width: 128px; height: 128px">
<caption>crisp-edges</caption>
</div>
<div>
<img src="https://i.imgur.com/fqgm8uh.png" style="image-rendering: -webkit-optimize-contrast; width: 128px; height: 128px">
<caption>-webkit-optimize-contrast</caption>
</div>
/*bug-in-github-api-content-can-not-be-empty*/
{"name":"image-rendering","settings":{},"filenames":["index.html","index.css","index.js"]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment