making sure image upload is a jpg or png