catch exceptions when resizing images, rather than blowing up in the
user's face