Image Optimisation Wordpress Plugin

Started by ukgimp, September 27, 2012, 08:56:19 AM

Previous topic - Next topic

ukgimp

Any good recommendations.

I would like to run a plugin across the files and optimise them in bulk, and going forward have them optimised when uploaded.

I use a CDN also.

Any good ones that people have tried?

ergophobe

For bulk processing in a *nix environment, I have usually used ImageMagick. You have to figure out the command you need and set all the parameters yourself, but that allows you to decide how much sharpening to do on each resize and things like that. It's been a long time since I've done anything like that, though, so I can't help much.

When you say "optimize", what do you mean exactly? IMO truly optimizing images is a one-at-a-time operation. You can make some guesses and do it automatically, but the results are never going to be great. In other words, if the quality of the images were important, I would optimize at least the larger sizes by hand and perhaps let smaller sizes be handled automatically (and remember, sharpening is always the very last operation).

rcjordan

>what do you mean exactly?

Right, what?  If you mean SEO, I stuffed everything that could be stuffed into tens of thousands of image tags and even the binaries (IPTC data, mostly) for years. It is only worth the trouble if you believe image search is source of quality traffic.

ukgimp


rcjordan

I've never used WP so I'm no help there.

>bulk

Irfanview, probably. But that'd be on your desktop, not those already on the server.  I realize there may be reasons this has to be serverside so if that is the case and no WP plugins turn up, search for php scripts. There were plenty of them.  If I recall correctly, they are going to use the 'GD' image library.

>upload

Again, there were php scripts to do this on the fly.

Rooftop

Not sure of a wordpress plugin, as i do my best to avoid wordpress*  However it is easy enough in PHP, so I can't think it is much harder with wordpress.  We used to use an opensource script called phpthum (I think that this is the same one:  http://phpthumb.sourceforge.net/

This is particularly useful as it caches the copies it makes rather than creating them on the fly every time.  We used to find them doing them all on the fly was a recipe for crashing servers.  Where possible I would use imagemagick rather than GD.  I haven't used GD for a while, but it used to always be really memory intensive. Particular as images got larger it hogged all available resources. Imagemagic was much more polite.

It seems that there are already a few plugins for WP that use this.  Could at least be worth a look: http://wordpress.org/extend/plugins/tags/phpthumb

*Drupal does this by default <- I have to stop myself posting this in most of the Wordpress threads.

rcjordan

>phpthumb

Good to know. Bookmarked.


Gimpy, while processing you can also add a domain watermark.  Then you'll soon see all the sumbitches who've stolen the pix you've stolen.

Rumbas

Have a look at http://code.google.com/p/timthumb/ - think there's some WP plugin stuff out there too. They had some security issues, but afaik they have been fixed.

ukgimp

>> Then you'll soon see all the sumbitches who've stolen the pix you've stolen.

LOL, that's partly correct, I hate them thieving fuckers :-0

grnidone

If it is just photos, I've always run them through a photoshop batch file.  PS will open the file, resize it, save it then move to the next one...no idea if GimP has it, but I'll bet it does.

ergophobe

Quote from: grnidone on September 28, 2012, 11:14:17 PM
If it is just photos, I've always run them through a photoshop batch file.  PS will open the file, resize it, save it then move to the next one...no idea if GimP has it, but I'll bet it does.

If it's okay to do it on the desktop - Irfanview and Caesium will do that too. I assumed for the batch processing he wanted to do it server-side so he didn't have to re-upload all of them

>>size

By default WP already stores derivatives of all sizes you display, does it not?

As I mention though, results are mediocre because you don't have much control. In Drupal you have more control (can set sharpening and things like that), but to truly optimize for size, you need to do one at a time based on visual quality. Some JPGs will look great at 50% quality and minimal sharpening, some will need 75% and a fair bit of sharpening to look decent. So truly optimizing is, in my opinion, still a manual operation if you want the smallest size with acceptable image degradation, because "acceptable image degradation" is in the eye of the beholder.