CSS image-rendering Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The image-rendering property sets the scaling algorithm used when an image is drawn larger or smaller than its natural size. It applies to the element, images in its other properties, and descendants.

It is inherited. The initial value is auto. If the image is not scaled, the property has no visible effect. Pair sizing with object-fit when you need crop or cover behavior.

Unsupported value.

The spec also defines high-quality, but browsers do not support it yet. Stick to auto, smooth, crisp-edges, and pixelated.

Limited availability.

smooth is mainly supported in Firefox. Prefer auto when you need portable photo-style scaling.

CSS Syntax

syntax.css
image-rendering: auto | smooth | crisp-edges | pixelated | initial | inherit;

Older draft names optimizeQuality / optimizeSpeed map to smooth / pixelated.

Property Values

ValueDescriptionTry it
autoDefault. Browser chooses the scaling algorithmTry it
smoothPrefer smooth color interpolation (photos). Limited supportTry it
crisp-edgesPreserve contrast and edges; little or no blurTry it
pixelatedNearest-neighbor style for a blocky pixel lookTry it
initialResets to autoTry it
inheritTakes the parent’s image-renderingTry it

How to Use image-rendering

Scale the image first, then pick an algorithm that matches the content type.

  1. Display the image at a size different from its natural size (CSS width/height or zoom).
  2. Use auto (or smooth where supported) for photos.
  3. Use pixelated or crisp-edges for sprites, icons, and pixel art.
  4. Compare in your target browsers — some values still differ.
PieceRequired?Role
Scaled imageYes (to see it)Natural size must differ from displayed size
image-rendering keywordYesauto, smooth, crisp-edges, or pixelated
Content typeRecommendedPhotos vs pixel art need different algorithms

Live Preview

A 16×16 sprite scaled to 128px. Switch algorithms and compare blur vs hard pixels.

smooth is mainly Firefox today. pixelated is the usual choice for upscaled pixel art.

Sprite
Four-color 16 by 16 pixel sprite scaled up

image-rendering: pixelated

CSS Examples

Each snippet focuses on image-rendering. The image must be scaled to see a difference. Use Try It Yourself for a live editor.

Example 1 — Pixelated Upscale

Keep hard pixels when enlarging a tiny sprite.

CSS
<style>
  img {
    width: 128px;
    height: 128px;
    image-rendering: pixelated;
  }
</style>

<img src="sprite.png" width="16" height="16" alt="Pixel sprite">
Try It Yourself

How It Works

  1. Start small. The source is 16×16.
  2. Scale in CSS. Width/height 128px force an upscale.
  3. Set pixelated. Nearest-neighbor style keeps blocky squares.
  4. Good for sprites. Photos usually look better with auto.

Example 2 — Default Auto

Let the browser use its standard smooth scaling.

CSS
<style>
  img {
    width: 128px;
    height: 128px;
    image-rendering: auto;
  }
</style>

<img src="sprite.png" width="16" height="16" alt="Scaled sprite">
Try It Yourself

How It Works

  1. Use auto. This is the initial value.
  2. Browser decides. Most engines smooth colors when upscaling.
  3. Softer edges. Pixel art often looks blurry with auto.
  4. Fine for photos. Soft scaling is usually what you want for camera images.

Example 3 — Crisp Edges

Preserve sharp contrast when scaling line art or icons.

CSS
<style>
  img {
    width: 128px;
    height: 128px;
    image-rendering: crisp-edges;
  }
</style>

<img src="sprite.png" width="16" height="16" alt="Crisp sprite">
Try It Yourself

How It Works

  1. Set crisp-edges. The engine prefers an algorithm that keeps edges sharp.
  2. Less blur. Color smoothing is avoided when possible.
  3. Similar to pixelated. On many sprites the two look alike; support still varies.
  4. Check Chromium. Full crisp-edges landed later than pixelated in Chrome/Edge.

Edge Cases & Pitfalls

If nothing changes, the image probably is not scaled.

scale

No effect at natural size

When displayed size matches intrinsic size, image-rendering does nothing visible.

smooth

smooth support is limited

Firefox supports smooth. Chrome and Safari typically fall back to default behavior. Prefer auto for portable photo scaling.

spec

high-quality is unsupported

It appears in the formal syntax but is not implemented. Do not rely on it.

svg

SVG has its own image-rendering

SVG also defines image-rendering. For pixel SVGs, shape-rendering="crispEdges" on the markup can help too.

fit

Object-fit still controls crop

object-fit decides how the image fills the box; image-rendering only changes how pixels are interpolated while scaling.

Browser Support

image-rendering is a browser graphics property. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Values vary

image-rendering

auto / pixelated: widely available. crisp-edges: strong in Safari/Firefox; Chromium fuller since ~148. smooth: mainly Firefox.

95% Common values
Google Chrome 41+ pixelated · crisp-edges later
Full / partial
Mozilla Firefox 3.6+ · smooth 93+
Full
Apple Safari 10+
Full
Microsoft Edge 79+ pixelated · crisp-edges later
Full / partial
Opera 28+
Full / partial
Samsung Internet Supported
Full / partial
Internet Explorer Partial / limited
Partial
image-rendering Widely supported

Bottom line: Use pixelated for pixel art in modern browsers. Treat smooth as progressive enhancement. Skip high-quality for now.

Key Takeaways

  • Role: pick how browsers scale an image when size changes.
  • Common values: auto, pixelated, crisp-edges (and smooth where supported).
  • Initial value: auto. Inherited. Needs scaling to matter.
  • Tip: photos → auto; pixel art → pixelated.

One line: image-rendering chooses blurry-smooth or hard-pixel scaling when an image is resized.

Frequently Asked Questions

It chooses the scaling algorithm when an image is drawn larger or smaller than its natural size. It has no effect on images that are not scaled.
The initial value is auto. The browser picks its usual scaling method, often smooth interpolation.
Both keep hard edges for pixel-style art. pixelated aims for a blocky nearest-neighbor look; crisp-edges preserves contrast and edges. Support and exact look can differ by browser.
Use it when scaling up small sprites, pixel art, or icons where you want visible square pixels instead of blur.
Yes. You can set it on a parent so nested images and backgrounds inherit the scaling preference.
The property is Baseline. auto and pixelated are widely available. smooth is mainly Firefox. crisp-edges support improved recently in Chromium. It is a browser graphics property, not a Node.js feature.

Next: inline-size

Learn the logical property for width in the inline axis.

inline-size tutorial →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful