HTML Error when uploading bigger photos

Hi, I encounter HTML error when trying to upload bigger photos to my site (e.g. 1000 x 1000). When i try with something smaller like 500 x 500, there's no error. Then i tried deactivating the "Automatically smush my images on upload" feature, then i can upload the bigger photos to my site without any errors. Why is this so? I tried many solutions that are mentioned like changing the PHP version and increasing maximum upload size (mine is now 128MB), but it still doesn't work when that feature is enabled.