Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 492
  • Last Modified:

Should server-side zlib compression be used for images?

Most if not all modern browsers support zlib compression.  Content can be compressed on the server-size and uncompressed by the browser.

It saves quite a bit of bandwidth on text files, but what about images?  Should this feature be enabled or disabled for images?
0
hankknight
Asked:
hankknight
2 Solutions
 
Ray PaseurCommented:
My sense is that it should be disabled, but I do not have any science to back that up.  However if you look at the compression ratios for JPG images and ZIP files made from the JPG images you will be able to find the science to support or refute my assertion.  If you want the best compression for images, it's my sense that JPG compressions will be better than ZLIB.
0
 
David S.Commented:
The common formats used for images on the web (JPEG, PNG, GIF) are compressed formats, which is why they are used. Therefore, it's not recommended to have web servers serve them with an additional layer of compression.

I seem to remember reading somewhere that adding an extra layer of compression to a PNG can actually increase the number of bytes instead of decreasing it in some cases.

There is something you can do, however. You can make sure that your images are fully optimized. (Image editors don't do as good a job as one would hope.)
http://www.dynamicsitesolutions.com/blog/2010/2/png-optimization/
http://www.smushit.com/ysmush.it/
http://imageoptim.pornel.net/
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now