I notice it uses high cpu when I load images from my media library. I have about over 1 million images uploaded and they are organized into folders by Post ID. Any tips to reducing CPU?

  • 1
    which cpu, the client machine or the server?, and what is exactly high. please give as much details as possible. Mar 2, 2013 at 13:50
  • I wouldn't expect any especially CPU when loading an image-- when saving the image, possibly, but not when loading it--, unless maybe the images are enormous, there are a lot of them, or you are loading via some script that does some processing at load time-- my-image-loader.php, or my-image-loader.js, something like that. Any of that sound familiar?
    – s_ha_dum
    Mar 2, 2013 at 15:25

1 Answer 1


When you upload an image, WordPress generates multiple images for each image size, e.g. medium, thumbnail, large etc

If you have a lot of custom image sizes you could cut down, but uploading 1 million images is going to take a lot of cpu, even without the resizing.

On top of that, each upload generates an attachment post, meaning your site effectively has at least 1 million posts to handle. This slows down listings considerably. Your CPU will be busy handling the queries for those posts in mysql, and grabbing each.

Given the sheer quantity, the only real tip I can give you that will have any noticeable impact, is to start deleting images.

  • someone downvoted me, why? Is there something wrong with my answer?
    – Tom J Nowell
    Mar 11, 2013 at 11:32
  • that'd be me. I downvote your comment by mistake when I was using my left hand with mouse. Sorry about this.
    – Jesse
    Mar 11, 2013 at 12:48
  • Ah no worries ^_^
    – Tom J Nowell
    Mar 11, 2013 at 14:02

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.