New Module: Image Compressor
New Module: Image Compressor
Hey,
I've developed a new module called Image Compressor. It helps you to compress all images uploaded to CMSms via Image manager without loss of quality to improve website performance. It uses the API Service of Yahoo's Smush.it. No registration needed!
I've developed a new module called Image Compressor. It helps you to compress all images uploaded to CMSms via Image manager without loss of quality to improve website performance. It uses the API Service of Yahoo's Smush.it. No registration needed!
Last edited by Foaly* on Sat Feb 12, 2011 5:21 pm, edited 1 time in total.
Re: New Module: Image Compressor
Sounds good, will check this out!
Make your community a better place!
Re: New Module: Image Compressor
Don't hesitate to post bugs and feature requests 

Re: New Module: Image Compressor
Great module, thanks for sharing.
However, I guess the API-URL should change from
to
With the latter the module works like a charm, where as it just gives an "invalid URL" error on the first API_URL.
There is also one error in the module:
it can't handle images with blanks in the name.
Best Regards
However, I guess the API-URL should change from
Code: Select all
define('SMUSHIT_API_URL', 'http://www.smushit.com/ysmush.it/ws.php?img=%s');
Code: Select all
define('SMUSHIT_API_URL', 'http://ws1.adq.ac4.yahoo.com/ysmush.it/ws.php?img=%s');
There is also one error in the module:
it can't handle images with blanks in the name.
Best Regards
Re: New Module: Image Compressor
Hey swgreed,
I changed the API URL, altough the first one works fine for me, because the latter also works fine.
Unfortunately both URLs can't handle spaces or umlauts even if they're encoded (spaces as %20 or +). So I added a warning instead.
Fixes are in git.
Thanks, Foaly*
I changed the API URL, altough the first one works fine for me, because the latter also works fine.
Unfortunately both URLs can't handle spaces or umlauts even if they're encoded (spaces as %20 or +). So I added a warning instead.
Fixes are in git.
Thanks, Foaly*
Re: New Module: Image Compressor
Hi Foaly,
works great!
However I gotone last feature request:
make the image names clickable or do an image preview. That would enhance the comfort deciding to optimize the image or not.
works great!

However I gotone last feature request:
make the image names clickable or do an image preview. That would enhance the comfort deciding to optimize the image or not.
Re: New Module: Image Compressor
Hey swgreed,
already thought of adding it before the next commit.
already thought of adding it before the next commit.
Why wouldn't you optimize an image when it's lossless?swgreed wrote:That would enhance the comfort deciding to optimize the image or not.
Re: New Module: Image Compressor
Prototype version of my javascript doesn't work in Firefox, curious. I don't manage to do away with the issue.
Re: New Module: Image Compressor
Can anybody please help me with a problem
I have just installed CMSMS on my PC using winamp, which worked fine.
When trying to run image compressor and clicking on the check all link, I get the following error
Does anybody have any ideas, google gives me nothing.
Thanks in advance
Richard
I have just installed CMSMS on my PC using winamp, which worked fine.
When trying to run image compressor and clicking on the check all link, I get the following error
Code: Select all
Notice: Undefined property: stdClass::$dest_size in C:\wamp\www\cmsms\modules\ImageCompressor\ImageCompressor.module.php on line 108
Notice: Undefined property: stdClass::$percent in C:\wamp\www\cmsms\modules\ImageCompressor\ImageCompressor.module.php on line 108
Thanks in advance
Richard
Re: New Module: Image Compressor
hi richard,
if you run it from your local computer, it can't work. imagecompressor uses yahoos service smushit to compress images.
i'll have to implement a better error handling.
if you run it from your local computer, it can't work. imagecompressor uses yahoos service smushit to compress images.
i'll have to implement a better error handling.
Re: New Module: Image Compressor
Thanks Foaly
Will just have to use it on the live server once everything is online
thanks for the reply
Richard
Will just have to use it on the live server once everything is online
thanks for the reply
Richard
Re: New Module: Image Compressor
Sorry for my late reply.
I've just installed the module in to 1.9.4.2. Works fine. If there are no images I get a "No images found". Maybe I can have a look on your installation if the problem persists?
I've just installed the module in to 1.9.4.2. Works fine. If there are no images I get a "No images found". Maybe I can have a look on your installation if the problem persists?
Re: New Module: Image Compressor
i'm getting "ajax error" in admin panel when trying to compress. it can check savings correctly but cannot compress. not seeing any errors in logs. what should permissions be for image file? any thing else i should verify?
thanks
thanks
Re: New Module: Image Compressor
hey cleatus,
are you using an old browser? file perms are checked by the module...
cheers,
Foaly*
are you using an old browser? file perms are checked by the module...
cheers,
Foaly*