The file upload server behavior has a checkbox to allow images only. You should start by checking that.
To show an error message when a non-image is uploaded you would have to move the upload code above the validation code and then you could validate the file extension. I think it will be blank once you check the allow images only checkbox when a non image is uploaded.