Resize using thumbnailimage.