“Resize keeping original” plugin

My camera, in the JPEG Fine mode where I generally shoot, produces 6000×4000 images. That’s a bit too large to serve on the web, but I didn’t want to have to go through a fiddly, painstaking manual resize process every time I upload something – I tend not to do a lot of post-processing in general, because my D5300 produces images of sufficient quality that I really don’t feel much time in post is required, and I prefer to save post work for stuff like this:

…because I am unbelievably basic. But hey.

I also noticed that a lot of web clients don’t correctly interpret EXIF orientation data in all cases, and a lot of the gallery thumbnails and the like were therefore displaying sideways.

So I wrote a WordPress plugin to deal with both of these problems for me – when I upload an image larger than 2048 pixels in either dimension, it’s resized down, respecting the aspect ratio, to fit within that bound (modulo a pixel or two to avoid fractional resize dimensions), and if its EXIF data says it was taken in a rotated orientation, then it’s counter-rotated so that it still looks right in clients which don’t respect the EXIF orientation field.

As the name implies, the original (full-size, unrotated) image is retained on the server, but it’s not exposed anywhere in WordPress, and can’t be accessed from the web. I’ve heard from a few people locally that it’s not at all inconceivable for someone to make a little side money selling photos on the web, and on the off chance that ends up looking like something I might be able to do, having the full-size originals already available will save me a lot of effort.

The resize-keeping-original plugin can be found on Github, for the benefit of anyone who might want it. Sooner or later, I’ll clean it up into something properly releasable and put it on the WordPress plugin list, so it can be installed from the dashboard. In the meantime, share and enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *