Adding code for creating resized version of image