cara memvalidasi biner gambar di simpul js
Use "image-size" npm module and check dimensions in try/catch, this module fails while parsing the file if the file isn't a valid image.
Ali Raza