So I have a file (uploaded using form) and I think the best way to validate if the image is an actual image is to actually create a new Image class of that file?
How can I make it so I can use the file to initiate a new image instance?
const fileFromForm = files[0];
const img = new Image();
const img.src = fileFromForm; // not sure if this will work ???