allow only png/gif/jpeg in file input dialog