Compress Images

During the testing, I get a suggestion to compress images.

But I have already optimized my images using Yahoo Smush It, so how to further compress images?

And I use shared hosting, so can anything be done about First Byte Time (back-end processing) or persistent connections (keep alive)

Smush It only does lossless optimizations (stripping out comments, etc). WebPagetest checks for lossy optimizations. Basically your jpeg’s were saved at a higher quality level than is probably necessary. WebPagetest uses a (very conservative) Jpeg Quality level 85 as the target (usually you can go to at least 75 without any visible issues).

First Byte times on shared hosting can be difficult to fix. You can try to minimize the amount of database interaction, disable plugins (assuming somerhing like wordpress) and cache the generated HTML pages but there’s only so much you can do (and it is a common problem with shared hosting).

Persistent Connections are harder. If you can enable something like cloudflare on your shared hosting plan then you can work around the persistent connection problem. Otherwise if support can’t address it my recommendation is to show your displeasure with your wallet and switch to a shared host that doesn’t have the same problems.

Thanks for the reply.

Compressing images with gzip is not of much interest, as GIF, JPEG or PNG are already compressed formats. Compressing them would just be a loss of CPU ressource on your server, without any gain in bandwidth.

480 weeks

<FilesMatch “.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$”>
Header set Cache-Control “max-age=290304000, public”

2 DAYS

<FilesMatch “.(xml|txt)$”>
Header set Cache-Control “max-age=172800, public, must-revalidate”

2 HOURS

<FilesMatch “.(html|htm)$”>
Header set Cache-Control “max-age=7200, must-revalidate”

mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*

Let me know if you’re still having problems or contact me at http://www.digitalmgmt.com

I don’t think enjoys mentioned ImageOptim, so give that a try: http://imageoptim.com/

ImageMagick works well.

Post the link of your site + someone may be able to assist you with other optimizations too.

Sometimes, simply switching which file formats your using can save some bytes - different image file formats are good at different things.

For example, if your images have a lot of flat colours and a limit palette (like a logo maybe?) then a GIF may be more appropriate. PNG typically wins out over JPG for smaller photograph like images, but JPG may win out in terms of file size for larger images - it may be worthwhile playing around with the formats to find out which works best for which images.

As pmeenan pointed out, using a higher compression amount on JPEG images will decrease file sizes (depending on the image and the location). As guidance, use higher compression ratios for background images as they often don’t need the finer detail that product images and “hero” shots do.

WebsiteSpeedExperts is right on the money.

Using .jpg is many times a good balance, because images can be made progressive, which is a big win.

You’re best served to post a link to your site, so someone can actually see what type of images you have + by type I mean both the image extension - gif/jpg/png - and pull down a copy of one of your images to determine things like number of close colors in image to see if image format conversion will help, like going from png → gif or similar.

Without your site link, it’s all speculation + no real way to give you any clear direction on what to do next.

Site speed is most important for success in online business , but images takes lots of time to load initally my site was very slow to render images , now after compression site gear up and working fast… using i use tool image compress tool (ofcourse it loose little quality) but need speed site for the visitors. and am a dot.net programmer i write small code for compression in web.config file.

mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_item_include file \.(html?|txt|css|js|php|pl)$ mod_gzip_item_include handler ^cgi-script$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^application/x-javascript.* mod_gzip_item_exclude mime ^image/.* mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* I have used this code but still does not improve page loading speed: [url=http://ford-ranger.weebly.com/]http://ford-ranger.weebly.com/[/url] There is no better solution to help me? Thank!

It doesn’t appear that your pages are being compressed using the above code.

You are putting it in the “.htaccess” file at the root of your domain, correct? It doesn’t have any file extension and it is literally .htaccess.

I would check with your hosts to see if they do support .htaccess and ask them to turn on http compression for you if that is the case. If not, then get a host who will.