Module: image_optimizer - lossless optimization of thumb/resize images and lossless rotation of full-size images
shadlaws
Joined: 2012-03-14
Posts: 183 |
Posted: Tue, 2012-12-04 14:45 | |||||
Image Optimizer uses three underlying toolkits, all performing lossless transformations on GIF, JPG, and PNG images. These are used to alter: The three toolkits used by the module are: The module comes with all three toolkits pre-compiled as libraries. By default it uses them, but can be configured to use copies installed elsewhere on your server instead. The module's lib directory includes both Windows and Linux versions of the toolkits. For security reasons, Windows should not be used on production sites. Both versions are provided here to enable development copies to still run Windows without issue. This module was inspired by the WordPress module EWWW Image Optimizer and the Gallery3 module Jpegtran. == Features == Full-size image manipulation Documentation is available at the normal location at http://codex.gallery2.org/Gallery3:Modules:image_optimizer Downloads are available as attached here: Let me know what you think! Take care,
|
||||||
Posts: 27300
Thanks for the contribution!
And the codex page as well
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 814
I have yet to test this out as I've been tied up with other things lately. Does the module go back through existing images and optimize as well? (a maintenance task or something?)
I'll give it a shot this weekend.
Thanks!
James
Posts: 183
@Dave - thanks much!
@James - yes it can, and it even has a clever mode you can use to make it happen faster. Here's the blurb from the codex doc page:
By default, the module only affects new images. There are two additional features in the admin settings to help rebuild of all your existing thumb and resize images.
* Mark all existing images for rebuild (for thumbs and resizes separately). Afterward, go to Maintenace -> Rebuild Images. Depending on your gallery size, this can be very time consuming.
* Enable update mode. This deactivates all other graphics rules to allow fast optimization on existing images; MUST deactivate this after initial rebuild! No new images should be added to the gallery while this is enabled! This will add site message banners to remind you of its presence.
Thanks!
Take care,
Shad
Posts: 814
Ahhh, always helpful to read the docs eh? Thanks so much! Awesome contribution.
Posts: 68
Wow this is awesome! Thanks shadlaw, I will definitely have to try it! I noticed on Google PageSpeed that most of the images on my homepage could be reduced in size by over 50% and up to 84%!!! I had seen that before when using PageSpeed but I didn't realize it had said "lossless" until now and when I saw that I had to do some investigation. I didn't realize there was such possible lossless JPEG and PNG compression. I thought I already picked my compression level and that was that.
I basically use Gallery, in addition to being a gallery, as a way to host images on my main Wordpress site in blog posts and such (often rather than the the media upload in Wordpress) so this could have a big impact for me, especially on pages with lots of images used this way. It's awesome to learn about this and then come here and find a plugin.
Since this is compressing the resize and thumbs and not the original, maybe this should be just "the way it works" out of the box and this method integrated with main Gallery. Why not? I know G devs guard against adding things for G3 that don't fit in the core that everybody would use but this one seems like an easy one to me.
Posts: 68
Well, two tries of it and it doesn't seem to have changed my thumbnails. I saved a folder of my album thumbnails before, and then tried running this, once with the "update mode" enabled, and once without, and the new thumbnails are the same size. Big thing is though that I am having problems doing the rebuild. The run without "update mode" enabled took me almost a week of checking and clicking for my 1700 photos because it stalls after doing so many (often about 20 at a time). So I certainly have some other problems. I'm using Bluehost and Gallery 3.0.4. The first run I was just clicking the link in the yellow notification at the top "click here to fix them", but in the second run I used the Maintenance screen. It says it's finished and I don't see any errors. Any ideas for me to try?
Posts: 2
OptiPNG
GIFsicle
are no more downloadable. the link are dead
Posts: 27300
fixed the links and updated the codex page.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 2
thanks
Posts: 112
Hello, i have more questions to the module.
first. in the admin page i read this:
"JPG Jpegtran by Jpegclub /usr/bin/jpegtran Correctly configured! sh: /var/www/virtual/xxx/html/xxxx/modules/image_optimizer/lib/jpegtran: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory"
"PNG OptiPNG by Cosmin Truta et al. /usr/bin/optipng Correctly configured! OptiPNG version 0.7.4"
"GIF GIFsicle by LCDF (not found) Correctly configured! LCDF Gifsicle 1.67"
is it OK or not?
edit:
Sorry, I sometimes have problems with understanding of technical English. And sometimes smokes my skull, and I overlooked the easiest. ;)
I must put the path from "Server-installed path" to Toolkit paths, and all works fine. almost...
Posts: 112
Hello, I have answered my questions confused by the previous post itself.
But I have a new question.
Currently I have all thumbs and Resizes rebuild. That took a lot of time. Now it is stuck and I broke it. The message in the admin section Maintenace is now: "Rebuild Images You have 2 out of date photos"
I have started it again, but it rebuild "0" images of 2
Did I 2 orphaned photos in the database registered?
I have all the albums (pages) is searched and no broken (thumb) images found.
Is there a log file?
I have seen also that the settings are in the Resizes this:
JPEG, progressive, quality: 100, subsampling OFF.
100% is a bit much, right? subsampling OFF is good? Better 4:2:0 (2x2)? Can I change this and if so where? Untouch In the Gallery3 is default 75% for Resizes.
Is it also possible to take the JPG quality% from the original?
Posts: 112
I have just uploaded a new album with "upload from server".
And then I noticed that I had are in the settings -> advanced -> gallery image_quality 100. Now I have changed it to 75. Then again rebuild all images. and now it's all fine. except for the 2 out of date photos.
I have no idea why the subsampling was OFF. My originals have this setting:
JPEG, progressive, quality: .., subsampling ON (2x2)
Original quality is different.
In the default settings of Gallery the thumbs and .album.jpg in 100% jpg quality. Is that right?
Now with this module as well as the Resizes (75%) after rebuild.
I am a bit overwhelmed. ;)
Thanks shadlaws, it's a big fine module!
The good one is, rebuild include the .album.jpg.