Creates a thumbnail from the uploaded image