How to make the uploaded image smaller than its original size?