How to accept only images and allow empty field also

i want to allow a user to only upload images and also allow the field to be empty
so in the server action i set the allowed types to be .png,.jpg,.jpeg
but if the user did not upload any image the error message show about the file type.

Community Page
Last updated: