Skip to main content
17 events
when toggle format what by license comment
Apr 9, 2015 at 12:59 comment added Stephen Ostermiller Other suggestions for optimization: I use pngcrush: pngcrush -brute file.png and jpegoptim: jpegoptim --max=80 --strip-all file.jpg for images that I publish on my websites.
Apr 9, 2015 at 12:13 comment added Simon Hayter It's also worth mentioning that gzip doesn't remove unnecessary data, while these command-line tools do, they will anything possible to get it down to the smallest size, for example sometimes it'll switch from RGB to index colors, it will even remove all the meta data if you choose to as for the most of the time is wanted anyway. Maybe using lossless on its own was a bad example, so lossless optimisation I mean.
Apr 9, 2015 at 12:05 comment added Simon Hayter @w3d sorry I mean lossless. Your absolutely correct that gzip does lossless however the compression ratio tends to be better offered by commandline tools such as jpegtran, pngcrush and so forth as they are purely optimised for one purpose, not everything. I have tested with gzip enabled before and things like Google pagespeed still recommend using lossless compression as possible savings, even through gzip is enabled and working on those file extensions. Using lossless compression applications I gain more savings, possibly only a few kb at a time but still it all adds up.
Apr 9, 2015 at 11:48 comment added MrWhite @bybe: "likes of PNG Lossly Compression" - presumably this should be "lossless"? "Then use a lossy compression to get it even smaller without losing quality" - although a lossy compression will arguably lose quality? But why compress an already compressed JPEG? And then in comments you state, "Nope, you need to use lossless compression", when the OP mentions GZIP, which is a lossless compression - although as mentioned, why compress an already lossy compressed JPG image?
Apr 9, 2015 at 11:22 comment added Simon Hayter yes, they provide 'Globally load balanced content delivery network (CDN)' ask em about it.
Apr 9, 2015 at 11:20 comment added user3511245 Alright thanks for your reply I will use the methods stated by you and see how it goes, once again thank you very much and one final question, I have Cloudflare Pro shouldn't that be enough?
Apr 9, 2015 at 11:19 vote accept user3511245
Apr 9, 2015 at 11:14 comment added Simon Hayter DNS lookup takes nano seconds, the server bite is the important part. DNS lookups are cached too, so if they go to another page there's no need to look it up. The benefits of using multiple domains out weights that of using one. I recommend you take a look at CDN services.
Apr 9, 2015 at 11:11 vote accept user3511245
Apr 9, 2015 at 11:11
Apr 9, 2015 at 11:11 comment added user3511245 Thank you very much for your help, I'm half way there - the only 2 problems are the amount of requests and if I use your method of multiple domains, wouldn't it mean that more time is spent on "Domain Lookup"?
Apr 9, 2015 at 11:09 comment added Simon Hayter tinyPNG API is free up to 500 images a month.
Apr 9, 2015 at 11:07 comment added Simon Hayter Yes, you can automate the process by using an online API, a image hosting service such as kracken.io, a commandline tool that you use a cron job on etc. There's just far to many ways to list.
Apr 9, 2015 at 11:07 history edited Simon Hayter CC BY-SA 3.0
added 417 characters in body
Apr 9, 2015 at 11:01 comment added user3511245 Alright, can that be automated upon uploading the image to my server through PHP? Thanks once again!
Apr 9, 2015 at 11:00 comment added Simon Hayter Nope, you need to use lossless compression...
Apr 9, 2015 at 10:57 comment added user3511245 Thank you for your answer helping me understand better about sprites, I have GZIP Compression enabled server side - is that enough or do I need something more? About your point of compression, can this be automated upon Image upload (in PHP)? and your last option, I currently just do this: example.com/image.png or .jpg, and make use of Cloudflare Business CDN should that do? or do I still need to server with different domain?
Apr 9, 2015 at 10:53 history answered Simon Hayter CC BY-SA 3.0