Solved

Should server-side zlib compression be used for images?

Posted on 2011-05-05
2
480 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

623 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