Moshe1010
Well-known member
I don't have super huge attachments folder, but it bothered me since every GB counts when you're on a SSD VPS. My initial attachments folder (not including avatars) was 7GB and I was able to decrease it to 4GB (about 40%) with a simple task. I initially wanted to build an add-on that does lossy compression by default, but I concluded it would be time demanding for a one time thing (if people would upload 1000+ images/day on my forum then I would do it). I could go even more extreme and compress it even more, but I was too lazy - you can get up to 80%, and in some rare cases even more.
So how does it work?
First let me show you the huge difference in size vs. no difference in quality. I'm heavy on HiDPI (e.g. Retina display), so keeping the quality and the original resolution of the pictures was the only option.
File 1: 14.2 MB
http://imagizer.imageshack.us/a/img908/7843/ABZQl9.jpg
After compression: 3.5MB (80% less) - can you notice any difference? same exact crazy resolution.
http://imagizer.imageshack.us/a/img538/4471/JM0l7E.jpg
File 2: 7.4MB
http://imageshack.com/a/img537/1594/MXF4XR.jpg
After compression: 4.9MB (35% less)
http://imageshack.com/a/img661/7687/81wjia.jpg
What's the secret?
Basically:
http://www.jpegmini.com/
They have a server, cloud and desktop solutions; I used the desktop version and uploaded everything manually to my FTP. For $20, you can use it as long as you want. If you want it to be automatically, they offer a cloud service ($40/month based on Amazon's services or a server based solution for $200/month). I've found these solutions not economical in the long run versus how much 1GB SSD costs.
Even more compression can be achieved by:
https://kraken.io/web-interface
Choose LOSSLESS compression there, not the LOSSY option (LOSSY would screw up quality with kraken, and you already did LOSSY compression with JPEGmini [which does that the right way]). Their free service is up to 1MB images (no limit - drag and drop. PRO service (API included) is up to 16MB/image). I've found their interface and compression better than Yahoo! Smush.it (http://www.smushit.com/ysmush.it/).
You can use Kraken for Wordpress as well (they have a plugin, but it require subscription which is $5/month the lowest).
Just to note, the above method works only on JPEG files. for PNG/GIF compression I would suggest installing (if you have VPS - install via SSH) PHP extensions like optipng/and gifsicle. You can also install jpegtran to keep compression jpeg files without compromising quality.
So how does it work?
First let me show you the huge difference in size vs. no difference in quality. I'm heavy on HiDPI (e.g. Retina display), so keeping the quality and the original resolution of the pictures was the only option.
File 1: 14.2 MB
http://imagizer.imageshack.us/a/img908/7843/ABZQl9.jpg
After compression: 3.5MB (80% less) - can you notice any difference? same exact crazy resolution.
http://imagizer.imageshack.us/a/img538/4471/JM0l7E.jpg
File 2: 7.4MB
http://imageshack.com/a/img537/1594/MXF4XR.jpg
After compression: 4.9MB (35% less)
http://imageshack.com/a/img661/7687/81wjia.jpg
What's the secret?
Basically:
http://www.jpegmini.com/
They have a server, cloud and desktop solutions; I used the desktop version and uploaded everything manually to my FTP. For $20, you can use it as long as you want. If you want it to be automatically, they offer a cloud service ($40/month based on Amazon's services or a server based solution for $200/month). I've found these solutions not economical in the long run versus how much 1GB SSD costs.
Even more compression can be achieved by:
https://kraken.io/web-interface
Choose LOSSLESS compression there, not the LOSSY option (LOSSY would screw up quality with kraken, and you already did LOSSY compression with JPEGmini [which does that the right way]). Their free service is up to 1MB images (no limit - drag and drop. PRO service (API included) is up to 16MB/image). I've found their interface and compression better than Yahoo! Smush.it (http://www.smushit.com/ysmush.it/).
You can use Kraken for Wordpress as well (they have a plugin, but it require subscription which is $5/month the lowest).
Just to note, the above method works only on JPEG files. for PNG/GIF compression I would suggest installing (if you have VPS - install via SSH) PHP extensions like optipng/and gifsicle. You can also install jpegtran to keep compression jpeg files without compromising quality.
Last edited: