Adding file extension to image