Solved

Should server-side zlib compression be used for images?

Posted on 2011-05-05
2
471 Views
Last Modified: 2013-12-07
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
Comment
Question by:hankknight
2 Comments
 
LVL 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 100 total points
ID: 35698202
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
 
LVL 42

Accepted Solution

by:
David S. earned 400 total points
ID: 35702142
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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Citrix XenApp, Internet Explorer 11 set to Enterprise Mode and using central hosted sites.xml file.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
Learn how to create interesting presentations by including videos to keep your audience engaged using Prezi. Select "Insert" from the top menu in your Prezi editor: Select "YouTube Video": Paste the video URL into the prompt: "Select "Insert":…
Learn how to use the remote presentation tool in Prezi to allow you to harness the power of this cloud based presentation platform. You can show your presentation with a remote audience using this free tool.

685 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question