Simpler logic when creating smaller image thumbnails