Example

A simple image-rendering property example:

Laboratory

description & Usage

We use the image-rendering property to determine the type of image scaling algorithm.

Informations

# Description
Default Value auto
Inherited yes
Animatable no
Version CSS3
JavaScript syntax object.style.imageRendering="pixelated"

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
image-rendering

Syntax

Values

Values Description
auto By using the auto value, you give the browser access to choose and use the appropriate algorithm.
smooth Use an algorithm that smooth out the colors in the image
high-quality Same as smooth, but with a preference for higher-quality scaling
crisp-edges Use algorithms that preserve image edges.
pixelated If the image is large, the nearest-neighbor algorithm is used.
initial Adds this value to its default property.
inherit It inherits this value from its parent tag.