change default image proxy output to jpg
check for errors before validate the uploaded file