I am accepting new files like this:
<input type="file" accept="image/x-png,image/gif,image/jpeg" required>
I do not currently have a converter in place, so webp images that are uploaded will not work when displayed on ios or Safari. To combat this, I added the jpg, png, and gif "accept" attribute.
However, if a user renames a webp as one of the accepted files, my file picker won't detect the mislabel, but it will still be a webp and therefore broken as described.
Is there a better way to check the file type using html or javascript?