To be able to help, some info is needed: Is this a production site, or a test one? Are there many plugins? Most wp problems come out of plugin failures or misconfig.
Having said that,
- Do you upload correct size of images? Remember that uploading too large images is pointless, as it increases load time and these images are scaled by the browser anyway – so they don’t look well if they are too big.
- Do you have set proper memory allocation in wp-config.php and .htaccess files? Are both values the same (sometimes this error is because of value difference)?
- Do you have cache or website image processing plugins? Purge cache, disable these plugins and check if error appears.
- When did you start to get this error? Was it after update or a plugin installation? If so, turn off plugins one by one and check if error appears.
- If above doesn’t work, enable debug mode in wp-config.php