Php image upload

I have created an image upload form with the html <input type=“file”…

But I want that the user only can select .jpg files on the client side, so that it’s impossible to upload wrong MIME-types, of course I have a check on the server side written in php but for large images its sometimes stupid to upload a .bmp and after five minutes or so to get an error that the file type is incorrect. So I want to prevent that, does anyone know such a solution for the client side? perhaps javascript? I have seen that its possible on a site but have lost the url :frowning:

thanks in advance