: Oversizing images to produce better looking pages? In the past, improper image resizing used to be a big no-no of web design (not mentioning improper compression format). Hence, for years I have
In the past, improper image resizing used to be a big no-no of web design (not mentioning improper compression format). Hence, for years I have been sticking to the policy where images (PNG or JPG) are resized on the server to match the resolution pixel-wise they will have with the rendered page.
Now, recently, I hastily designed a HTML draft with oversized images, using inline CSS style such as width:123px and height:123px to resize the images. To my (slight) surprise, the page turned out to look much better that way.
Indeed, with better screen resolution, some people (like me), tend to browse with some level of zoom (aka 125% or even 150% zoom), otherwise fonts are just too small on-screen. Then, if the image is strictly sized, the enlarged image appears blurry (pixel interpolation effect), but if the image is oversized the results is much better.
Obviously, oversizing images is not an acceptable pattern if your website is intended for mobile browsing, but is there case where it would be considered as acceptable? Especially if the extra page weight is small anyway.
More posts by @Kevin317
2 Comments
Sorted by latest first Latest Oldest Best
I would argue that oversizing images is a bad idea, but I think you might be on the right track.
Oversizing would indicate that you're providing images that are bigger than they have to be, when your question would indicate that you might want to consider adding some custom CSS to your web site, possibly using media queries, to accommodate a larger display/resolution. If you're zooming your own site, and you believe that some others might as well, wouldn't it make sense to change the site so it appears at that scale to begin with?
I don't think you're going to get too much of a penalty with using slightly higher resolution images, since the average page size is so large anyways. However, if I was shipping those higher resolution images, I'd want to use them in conjunction with a higher resolution layout, so that everyone would be able to reap the benefits.
I guess technically a responsive image would fall into this bracket, but I personally feel they are bad - as you say for mobile etc. The mobile has to compress them, download them, uncompress them, then resize them.
I like the idea of the picture tag which may never happen. Someone ran up a polyfill example at github.com/scottjehl/picturefill. I personally love the idea of this - swapping in images for different resolutions.
Apple, to deal with their nice new iPad, are using this code to deal with their images - gist.github.com/2029936
You can technically do it now using Media Queries but there are issues with mobiles still downloading the images that are meant to be unused/hidden.
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.