image-rendering
The image-rendering CSS property sets how images are scaled, retaining smoothness for photos, or hard edges for pixel art and QR codes.
Overview
The image-rendering CSS property sets how images are scaled, retaining smoothness for photos, or hard edges for pixel art and QR codes.
Browser support
| Feature | Desktop | Mobile | ||||
|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Safari | Chrome Android | Safari iOS | |
| 13 | 79 | 3.6 | 6 | 18 | 6 | |
auto | 13 | 79 | 3.6 | 6 | 18 | 6 |
pixelated | 41 | 79 | 93 | 10 | 41 | 10 |
1+Supported (version) Not supported ※Has note Sub-feature descriptions sourced from MDN Web Docs (CC BY-SA 2.5)
Syntax
CSS
.pixel-art {
image-rendering: pixelated;
}
.photo {
image-rendering: auto;
} Live demo
Use cases
Using image-rendering
The image-rendering CSS property sets how images are scaled, retaining smoothness for photos, or hard edges for pixel art and QR codes.
Cautions
- May not be supported in older browsers.
Accessibility
- Make sure visual changes are conveyed appropriately to assistive technology.
Related links
Powered by web-features