UPDATE The bug described below is due to a currently undetermined WordPress theme conflict. It also affects default twenty series themes prior to 2013.
…again one of those posts that are more a reminder to myself, but if anyone else find these things useful…
I’ve been using NextGEN Gallery for years now and it’s had one persistent bug since the beginning. I honestly don’t know how this is still an issue in a gallery plugin for and by people who supposedly care about quality presentation of their images, photos or anything else?!
In sidebar 2 to the right I’m using a widget to display 5 most recently uploaded photos. But this widget has had the same stupid bug since I can remember and the same bug I have to fix any time I upgrade to a new version of the plugin. For some reason the widget completely ignores width/height (aspect) ratios of images, instead it stretches/squeezes them to fit what are supposed to be maximum values (option available in widget settings). I simply want them to be of a certain width to fit the sidebar but I don’t care how high they are.
My solution is simple but it still annoys me that this is even an issue in a photo gallery product. People can’t possibly be shooting/wanting squeezed images?!? Anyway, my solution has always been to modify display_gallery.php (in current version 2.0.61 located in wp-content/plugins/nextgen-gallery/products/modules/widget/templates) and simply delete the height variable (entire line 24 in current version).
height="php echo esc_attr ($settings ['image_height']);"
Obviously someone bound by height restrictions would delete the width (line 23) in this case and obviously this shouldn’t even be required for anyone who cares about correctly sized images.
Like I said, this bug has been around for years but nobody bothered to fix this ever so I’m always reluctant to update to newer versions as they always mess things up and I have to remember how I fixed it in the first place.