Tweak image resize function (height eq or gt)