lIP TT lIP TT - 8 months ago 50
HTML Question

HTML accept attribute multiple image types

In my code I have got this input type file:

<input type="file" id="chatsf" accept="image/png,image/jpg">

What I want is this input to only accept PNG and JPG files, but with my code it only accepts PNG files.


I believe the correct string for .jpg files is image/jpeg:

<input type="file" id="chatsf" accept="image/png, image/jpeg" />