added image-downloading
added some validations on the uploaded image