I had the same issue just now while uploading a new logo.
Could not find a logo file theme/images folder, so the logo must be uploaded somewhere else, so tired a diferente approach.
Remembered what I had recently changed and it was selecting PHP 8 on cPanel, up from PHP 7.4
Went to cPanel and changed PHP back from to 7.4 again.
Uploaded the logo with again and problem solved.
The issue my be relative to PHP Version or more likely to PHP extensions loaded (imagick or other) being active or have not activated.
Will dig into that further to confirm but I believe imagick was not selected on PHP8.
Hope it helps.
Best regards