image compression with tinypng
Thought I share this:
I am currently setting a new shop up. Looking for optimazation options I came to the part the images. After a lot of searching and trying different tools to optimize the images I found the best tool to be tinypng (www.tinypng.com). I gave me even 100% compression without loosing the quality.
Great! Then a problem came up. How do I automate this? Altough the product are not that many I didn’t want to spent time by uploading it to the web and then recreate the images + recreation bumped the size up again. Searching the web I found https://github.com/Benichou34/tinify a free module that compresses the images. All you have to do (apart of installing it) is to get a free api key from tinypng. I can run with a cron job so that is good also.
Only problem I have until now that when I access the module in the BO I get the following error message:
Notice on line 178 in file tools/smarty/sysplugins/smarty_internal_templatebase.php(157) : eval()'d code  Undefined index: name
Seems to work though. Will report later more
There is actually a tiny png module that is open source that works with thirty bees, I tested it some months back. https://github.com/Benichou34/tinify
On another note, we have added webp images to the core of 1.0.4, for even more optimization.
@lesley we are talking about the same module
I totally missed the part where you posted the module, sorry about that.
Do you have the same error on tb also ?
Its not an error really, its just a notice that the name is not defined yet when that runs. It should not affect the use of it. It could likely be cleaned up, I have thought about forking it to the community repo.
@lesley Would be very usefull. Tested a image from the tb demo store (candle image) and tiny png gave a 38% compression