0

I have searched everywhere for an solution and even though I have found others with similar issues it seems they are not the same.

I have a fresh WordPress install and have it setup for multisite. When I upload images within the Media Library or even within a post edit screen (setting featured image) that are a certain size I get the error 'An error occurred in the upload. Please try again later.' Then a broken image thumbnail will show within the Media Library. As if some of the image data was able to upload but not all the data.

I adjusted my php setting to:

memory_limit = 32M max_execution_time = 300

I also adjusted the WordPress network settings 'Max upload file size' to allow for a larger file size. I am allowed to upload up to 5M. However, it seems to be a resolution size issue and not file size. (read more below)

I also checked to make sure the images that were able to upload (completely) were going to the right location based on a multisite setup. Yes..all images are loaded into the right location. 'wp-content/uploads/year/month/images...'. For each image that was able to upload is also has the different sizes (thumbnails etc..) based on theme settings and such. I also noticed that if an image failed to upload it showed only the original image file within the folder and no other compiled sizes for that image. It is almost like the image process stopped and triggered the error.

I did a number of test and all the images were under 1M. Some would fail and some would upload fully. I then started playing with the resolutions and noticed an image around 1900x1500 @ 500k would fail. However, I would then crop the image to around 1900x1000 and it uploaded successfully. At some point the resolution is determining fail and success of the upload. Again...I almost feel it is timing out during the process.

As a side note I am on a new dedicated server setup so I am not sure if that may cause an issue with a setting not right.

Please let me know your thoughts...thanks.

1 Answer 1

1

There is nothing like answering your own question.

After more testing I have found that increasing the PHP memory_limit fixed the issue. Which would all make sense, the larger resolution of the image means more processing to compile the different sizes when uploading and saving the image.

I increased it to 96M and problem gone.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.