I am unable to set featured image for posts/pages. The 'set featured image window' opens but never loads and thumbnails.

Then I tried to upload the image using Media, it stucks at crunching. But when I refresh the media page after quire good amount of time, image was uploaded.

Things I have tried:

  • Disabling all the plugins
  • Regenerating thumbnails
    • gives me this error function (){if(h){var d=h.length;!function f(b){n.each(b,function(b,c){var d=n.type(c);"function"===d?a.unique&&k.has(c)||h.push(c):c&&c.length&&"string"!==d&&f(c)})}(arguments),b?e=h.length:c&&(g=d,j(c))}return this}
  • Removed all the images from existing Media Libary
  • Manually removed UPLOADS/2014 folder.
  • Change to default twentyfourteen theme.
  • Asked hosting to reset all file permissions
  • Is this something new? The website has been working fine up until now? Try clearing your cache and cookies.
    – deflime
    Commented Jul 18, 2014 at 22:07

2 Answers 2


If this is still a problem, then you can find my answer on wordpress.org's support forum, it might help: wordpress.org/support/topic/resize-failure-on-some-images-with-odd-message

This is a part of a code from the jQuery library, to be specific this part is responsible for handling callbacks. It is displayed, because the reponse from wordpres is unparsable JSON data. If you try to regenerate the thumbnails again in firefox you can open the network tool from the developer tools and read the response from wordpress. In my case it was: Warning: copy(/var/app/current/wp-content/uploads/2014/11/reindeer.jpg): failed to open stream: No such file or directory in /var/app/current/wp-admin/includes/class-wp-filesystem-direct.php on line 231 {"error":""reindeer" (ID 5149) failed to resize. The error message was: The originally uploaded image file cannot be found at <code>http:\/\/mysite.com\/wp-content\/uploads\/2014\/11\/reindeer.jpg<\/code>"}

From there you need to figure out what to do, depending on the error message.

  • If you disable php warning, then the Regenerate Thumbnails plugin will display the error messages as the response possibly contains a php warning thus making it impossible for jQuery to parse it.
    – Gino
    Commented Jun 14, 2015 at 18:27

I would try a couple of things:

  1. Check the image itself, I've come across jpg images that have malformed headers so on my linux based desktop (Xubuntu) i can't open them in Thunar/Ristretto but can open them in GIMP.

  2. Try re-uploading (after a DB/File backup) the WordPress core files again, perhaps one of them was corrupted during upload/unpacking?

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.