class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
There is something strange... Basically, the MIME is detected, and validated as image/jpeg; (note the semi-colon at the end). But because it has the semi-colon at the end, it is not recognized as an image MIME type, thus disabling image processing.
But the regex shouldn't return the semi-colon, see https://regex101.com/r/omnTR3/1
I also see that you are not using the latest version of the class. Please try again with the latest release, or the master branch.