ElkArte Community

Extending Elk => Addons => Topic started by: Spuds on June 08, 2014, 10:39:31 pm

Title: [ADDON] Smush.it
Post by: Spuds on June 08, 2014, 10:39:31 pm
My old buddy, smush.it !  Lossless compression of image files to save disk space and bandwidth.  There are a few things to be aware such as file size limits the site will accept (<1M) and sometimes its general availability (its sometimes down)  Overall however, this can compress attachments 5-20%.  Since the addon needs to be able to move, copy, update attachment files, you may run in to permission issues on your site depending on how you have it set up and what user/group your PHP service is running under ...  thats up to you to fix permission issues.


Smush.it!


Introduction
This adds the ability to run WPMU DEV WordPress Smush API service on your attachments.  Smush.it uses optimization techniques specific to each image format to remove unnecessary bytes from image files. It is a "lossless" tool, which means it optimizes the images without changing their look or visual quality. Typical savings are in the 5-20% file size reduction.  After Smush.it runs it will report how many bytes have been saved as well as the percent reduction for each file.  Smaller files save bandwidth, disk space and make your forum faster.

License
This modification is released under a MPL V1.1 license, a copy of it with its provisions is included with the package.

Features
Important Notes

Installation
Simply install the package to install this addon.

Repo / Download
http://addons.elkarte.net/utility/Smushit.html
Title: Re: [ADDON] Smush.it
Post by: forumsearch0r2 on July 17, 2014, 03:49:05 pm
Any chances to support Kraken.io soon?
Title: Re: [ADDON] Smush.it
Post by: Spuds on July 17, 2014, 04:33:23 pm
I'll begin working on that now  :D


ETA: bummer, I don't see any free API, they have a web page interface with the same 1M limit as smushit but all the API and keys are charge for
Title: Re: [ADDON] Smush.it
Post by: forumsearch0r2 on September 09, 2014, 10:57:58 pm
Yes, you'd probably need a key for that.
Title: Re: [ADDON] Smush.it
Post by: kucing on November 12, 2015, 02:45:08 am
hi, smush it already killed by yahoo. any alternative to optimize images uploaded on Elkarte automatically? maybe another online services that can be integrated to ElkArte.

or standalone plugin like EWWW Image Optimizer for WordPress: https://wordpress.org/plugins/ewww-image-optimizer/ so we don't need to be depending on 3rd party.

thanks!
Title: Re: [ADDON] Smush.it
Post by: radu81 on November 12, 2015, 08:16:02 am
There is also an addon availble to esize the images http://www.elkarte.net/community/index.php?topic=1372.0
Title: Re: [ADDON] Smush.it
Post by: kucing on November 12, 2015, 01:10:58 pm
Thanks @radu81 , but it's not exactly what i need. :)

I think I found 1 to 1 replacement: http://resmush.it/ they claim 100% compatible  with Yahoo Smush It API. Can you take a look @Spuds

Thanks!
Title: Re: [ADDON] Smush.it
Post by: Spuds on November 12, 2015, 02:52:10 pm
I had updated the addon, looks like 6 months ago, to use the service from wpmudev.org instead of the defunct yahoo service.  The new service has been much much more reliable as well. 

Looks like I never updated the description of the addon to note the change (that it does not use yahoo)

Anyway if you have an old version, uninstall it and delete it.  Then get the latest from the addon site and install that.  It should work just fine.
Title: Re: [ADDON] Smush.it
Post by: kucing on November 14, 2015, 02:39:36 pm
Thanks! I installed Resize attached images addon too.
Title: Re: [ADDON] Smush.it
Post by: radu81 on January 27, 2016, 10:37:53 pm
I wonder why I did not installed this since the first day of my forum. I use the addon Attachment Image Resize (http://addons.elkarte.net/2015/12/Attachment-Resize/) and both addons are working fine together. It took some hours to resize all my attachments, (about 6000 images), Chrome crashed different times so I started the process more than once. I resized some attachments manually, but in the end I can say I gained about 10% of my attachments size.

Thanks Spuds for this great addon

p.s. you may want to correct this, I think is related to Miserable User addon
(https://www.elkarte.net/community/imagecache.php?image=http%3A%2F%2Fi.imgur.com%2FCjGzb15.png&hash=3a4e50bb22d1639b3b8be39a660d7db3" rel="cached" data-warn="External image, click here to view original" data-url="http://i.imgur.com/CjGzb15.png)
Title: Re: [ADDON] Smush.it
Post by: Spuds on January 28, 2016, 12:32:30 am
Thanks ... good old cut and paste !

Glad that it was able to compress things a bit for you :D I also get about 10% or so on most image files, and its a lossless compression which is nice.
Title: Re: [ADDON] Smush.it
Post by: radu81 on September 17, 2017, 01:16:02 am
After a quick test seems to work fine on 1.1 RC2 ;)
Title: Re: [ADDON] Smush.it
Post by: Spuds on September 17, 2017, 04:11:06 am
Cool  8)
Title: Re: [ADDON] Smush.it
Post by: Spuds on November 26, 2017, 11:29:19 pm
Updated package to support ElkArte 1.1
Title: Re: [ADDON] Smush.it
Post by: radu81 on May 21, 2018, 09:44:49 am
I noticed a few errors in elkarte log:
Exception: Call to undefined function getAttachmentFilename()
/index.php?action=topic;sa=printpage;topic=6122.0
File: /public/sources/subs/smushit.subs.php
Line: 458
Title: Re: [ADDON] Smush.it
Post by: Spuds on May 21, 2018, 02:35:56 pm
I'd say probably due to 1.1.3  ... I'll need to make an update to fix.

ETA.  Nope, just looks like an old error Hummmm

This should fix it, https://github.com/Spuds/Elk-Smush.it/commit/5e719c723ec4fb8fa6f42e6f85aad4c17a6e0e45#diff-f921fd1c0a3dc59b032157ef3f5c0947
Title: Re: [ADDON] Smush.it
Post by: radu81 on May 21, 2018, 03:43:45 pm
Thanks for the quick fix, I just installed the 0.0.5 version and seems to work fine ;)