javascript - HTML How to get image to load with less quality -
so have image (png file) want scaled @ say, 90%, relative webpage. however, png file big, , when scaled, not take several seconds load, eats ram (my computer has given me warnings low on memory). not need picture quality in instance, how let image render less quality (to speed load time) while preserving scaling , not altering original file?
~
you scale image proportionally html , css browser still load whole image memory. need use photo editing software change resolution of image , image format jpeg, has better compression algorithm png image format.
html
:
<div class="img_resz"> <img src="img.jpg"> </div>
css
:
.img_resz img { width: 90%; }
Comments
Post a Comment