image resizing tweaks, apologies for so many commits tonight