CSS Imagerendering Property

The image-rendering property sets an image scaling algorithm.

By default, each browser will apply to aliasing to the scaled image to prevent distortion, but a problem can arise if you want to keep the original pixelated form of the image.

Sometimes, you can combine the crisp-edges a pixelated values of the image-rendering property, for providing them some fallback for each other.

Initial Value auto Applies to All elements. Inherited Yes. Animatable Discrete. Version CSS3 DOM Syntax object.style.imageRendering = “pixelated”; Syntax
image-rendering: auto | crisp-edges | pixelated | initial | inherit;

Example of the image-rendering property:
html>


Title of the documenttitle></p> <style> .pixelated { image-rendering: pixelated; } .resize { width: 45%; clear: none; float: left; } .resize:last-of-type { float: right; } .resize img { width: 100%; } img { margin-bottom: 20px; width: 100%; } .original img { width: 20%; } body { background-color: #ccc; padding: 20px; }<br /> style><br /> head><br /> <body></p> <h2>Image-rendering property exampleh2></p> <div class="original"> <p>Original image size:p> <img decoding="async" src="/uploads/media/default/0001/02/ df105fa653fee0b33c785dd7b3d.png" alt="W3docs logo" /><br /> div></p> <div class="resize"> <p><code>image-rendering: autocode>p> <img decoding="async" src="/uploads/media/default/0001/02/ df105fa653fee0b33c785dd7b3d.png" alt="W3docs logo" /><br /> div></p> <div class="resize"> <p><code>image-rendering: pixelatedcode>p> <img decoding="async" class="pixelated" src="/uploads/media/default/0001/02/ df105fa653fee0b33c785dd7b3d.png" alt="W3docs logo" /><br /> div><br /> body><br /> html> Result<br /> Values<br /> Value Description auto A standard algorithm maximizing the appearance of an image. This is the default value of this property. crisp-edges The values of the image is preserved without smoothing or blurring. pixelated The browser preserves its pixelated style by using nearest-neighbour scaling. initial Makes the property use its default value. inherit Inherits the property from its parents element.</p> </div> </div> </article> </div><!-- #content --> <ul class="default-wp-page clearfix"> <li class="previous"><a href="https://e-classifieds.me/daftar-hp-samsung-yang-tidak-bisa-pakai-kartu-smartfren/" rel="prev"><span class="meta-nav">←</span> Daftar Hp Samsung Yang Tidak Bisa Pakai Kartu Smartfren</a></li> <li class="next"><a href="https://e-classifieds.me/dota-2-items-for-heroes/" rel="next">Dota 2 Items For Heroes <span class="meta-nav">→</span></a></li> </ul> </div><!-- #primary --> <div id="secondary"> <aside id="block-2" class="widget widget_block widget_search clearfix"><form role="search" method="get" action="https://e-classifieds.me/" class="wp-block-search__button-outside wp-block-search__text-button wp-block-search"><label for="wp-block-search__input-1" class="wp-block-search__label" >Cari</label><div class="wp-block-search__inside-wrapper " ><input type="search" id="wp-block-search__input-1" class="wp-block-search__input wp-block-search__input" name="s" value="" placeholder="" required /><button type="submit" class="wp-block-search__button wp-element-button" >Cari</button></div></form></aside><aside id="block-3" class="widget widget_block clearfix"> <div class="is-layout-flow wp-block-group"><div class="wp-block-group__inner-container"> <h2>Recent Posts</h2> <ul class="wp-block-latest-posts__list wp-block-latest-posts"><li><a class="wp-block-latest-posts__post-title" href="https://e-classifieds.me/rise-of-indie-games-kreativitas-tanpa-batas-di-dunia-game/">Rise of Indie Games: Kreativitas Tanpa Batas di Dunia Game</a></li> <li><a class="wp-block-latest-posts__post-title" href="https://e-classifieds.me/xiaomi-pamer-teknologi-wireless-charger-baru-seperti-apa/">Xiaomi Pamer Teknologi Wireless Charger Baru Seperti Apa</a></li> <li><a class="wp-block-latest-posts__post-title" href="https://e-classifieds.me/zero-trust-network-security-5-top-benefits-and-key-components/">Zero Trust Network Security 5 Top Benefits And Key Components</a></li> <li><a class="wp-block-latest-posts__post-title" href="https://e-classifieds.me/%e6%96%b0%e6%89%8b%e7%94%b3%e8%af%b7600-%e7%ad%be%e8%af%81%e7%99%bb%e9%99%86-%e6%96%b0%e8%b6%b3%e8%bf%b9/">新手申请600 签证登陆 新足迹</a></li> <li><a class="wp-block-latest-posts__post-title" href="https://e-classifieds.me/zero-trust-security-encryption-consulting/">Zero Trust Security Encryption Consulting</a></li> </ul></div></div> </aside><aside id="block-4" class="widget widget_block clearfix"> <div class="is-layout-flow wp-block-group"><div class="wp-block-group__inner-container"> <h2>Recent Comments</h2> <ol class="wp-block-latest-comments"><li class="wp-block-latest-comments__comment"><article><footer class="wp-block-latest-comments__comment-meta"><a class="wp-block-latest-comments__comment-author" href="https://wordpress.org/">A WordPress Commenter</a> mengenai <a class="wp-block-latest-comments__comment-link" href="https://e-classifieds.me/hello-world/#comment-1">Hello world!</a></footer></article></li></ol></div></div> </aside><aside id="block-30" class="widget widget_block widget_text clearfix"> <p><strong><a href="https://www.doyouknowthemuffinpan.com/" data-type="URL" data-id="https://www.doyouknowthemuffinpan.com/">www.doyouknowthemuffinpan.com</a></strong></p> </aside><aside id="block-32" class="widget widget_block widget_text clearfix"> <p><a href="https://semar99.net/" data-type="URL" data-id="https://semar99.net/">semar99</a></p> </aside><aside id="block-34" class="widget widget_block widget_text clearfix"> <p><a href="https://infini88.link/" data-type="URL" data-id="https://infini88.link/">infini88</a></p> </aside><aside id="block-36" class="widget widget_block widget_text clearfix"> <p><a href="https://untung99.com/" data-type="URL" data-id="https://untung99.com/">untung99</a></p> </aside><aside id="block-40" class="widget widget_block widget_text clearfix"> <p><a href="https://www.anothersunnyday.net/">https://www.anothersunnyday.net/</a></p> </aside> </div> </div><!-- .inner-wrap --> </div><!-- #main --> <footer id="colophon" class="clearfix "> <div class="footer-socket-wrapper clearfix"> <div class="inner-wrap"> <div class="footer-socket-area"> <div class="footer-socket-right-section"> </div> <div class="footer-socket-left-section"> <div class="copyright">Hak Cipta © 2024 <a href="https://e-classifieds.me/" title="Untung99 Situs Judi Slot Online Terbaik Dan Terpercaya" ><span>Untung99 Situs Judi Slot Online Terbaik Dan Terpercaya</span></a>. Keseluruhan Hak Cipta.<br>Tema: <a href="https://themegrill.com/themes/colormag" target="_blank" title="ColorMag" rel="nofollow"><span>ColorMag</span></a> oleh ThemeGrill. Dipersembahkan oleh <a href="https://wordpress.org" target="_blank" title="WordPress" rel="nofollow"><span>WordPress</span></a>.</div> </div> </div><!-- .footer-socket-area --> </div><!-- .inner-wrap --> </div><!-- .footer-socket-wrapper --> </footer><!-- #colophon --> <a href="#masthead" id="scroll-up"><i class="fa fa-chevron-up"></i></a> </div><!-- #page --> <script type='text/javascript' src='https://e-classifieds.me/wp-content/themes/colormag/js/jquery.bxslider.min.js?ver=2.1.5' id='colormag-bxslider-js'></script> <script type='text/javascript' src='https://e-classifieds.me/wp-content/themes/colormag/js/navigation.min.js?ver=2.1.5' id='colormag-navigation-js'></script> <script type='text/javascript' src='https://e-classifieds.me/wp-content/themes/colormag/js/fitvids/jquery.fitvids.min.js?ver=2.1.5' id='colormag-fitvids-js'></script> <script type='text/javascript' src='https://e-classifieds.me/wp-content/themes/colormag/js/skip-link-focus-fix.min.js?ver=2.1.5' id='colormag-skip-link-focus-fix-js'></script> <script type='text/javascript' src='https://e-classifieds.me/wp-content/themes/colormag/js/colormag-custom.min.js?ver=2.1.5' id='colormag-custom-js'></script> </body> </html> <!-- Page cached by LiteSpeed Cache 5.7.0.1 on 2024-04-28 14:29:14 -->