Problem is now solved. Thanks to user “blobfolio” here:
It sounds like you may have corrupted the image metadata. Have you
tried running a plugin like
https://wordpress.org/plugins/force-regenerate-thumbnails/ to
regenerate the images/meta?
Solution:
So the solution is to force regenerate all the thumbnails. For example using the plugin mentioned above in the quote.