Check the Photo After They Pick It: Keeping Image Validation Off the Critical Path
Client-side photo checks are useful, but shipping a decoding library to everyone who lands on the page is not. Load the validator when a file is chosen, keep the rest of the form untouched when it fails, and let the server catch what the checker misses.