How to restrict file upload types?

How to restrict file upload types?

Is there a way to restrict or validate the file type in the "file upload" field? I want the users to upload only image file types (jpg, png, bmp or gif), and they shouldn't be allow to upload zip, exe, rar, pdf... files.

Thanks