I am having a strange issue with the built in wordpress image editor. I have no problem uploading files or preforming any other media functions. The only thing I seem to be unable to do is utilize the image "edit" capabilities (the area where you can crop, resize, rotate...)

When I click on "edit" for an image I see the editor and I see the thumbnail on the right, wordpress just won't show me the actual image in the main area and thus I can't utilizing any of the editing capabilities.

I am assuming this must be some type of JavaScript conflict however I not sure the best way to diagnose this other than what I have already done (disabling all plugins and ensuring no functions.php file is modifying a setting or including other javascript).

How can I diagnose this issue to see what might be going wrong?

  • It could also be a PHP issue. If you don't have the right modules or version of PHP installed, WordPress is built to "decompose gracefully" ... meaning that certain bonus features become disabled if your system's setup doesn't support them. Can you run phpinfo (php.net/manual/en/function.phpinfo.php) on your site and report back what your system's using?
    – EAMann
    Commented Sep 10, 2010 at 14:22
  • Open the page in Firefox with Firebug Add-On installed. Check for Javascript Errors in the log. Please report back if you have any Javascript Errors.
    – hakre
    Commented Sep 14, 2010 at 17:40
  • 1
    @eamann @hakre Thanks guys - i ended up figured out what was going on through a great deal of trial and error. See my attached answer in case your interested. Commented Sep 14, 2010 at 20:19

2 Answers 2


I have actually managed to resolve my own problem. For anyone else that might ever read this the problem which caused this was that my functions.php file had a closing


at the very end. For whatever reason this is what cause the issue and by removing this last line it was working again.

  • 3
    You might have had some characters (whitespace) after that ?>. See core.trac.wordpress.org/ticket/12307 and core.trac.wordpress.org/ticket/10633
    – hakre
    Commented Sep 14, 2010 at 22:17
  • I had the same problem - and this solution (removing the ?>) at the end of my theme functions.php worked for me, great! Thanks very much for this advice.
    – user4815
    Commented Apr 21, 2011 at 10:28
  • 1
    I have this exact problem right now however I wasn't as lucky as you, I have removed any closing ?> tags and whitespace from my functions file and all files that I have included into my functions file and I still have the problem. Very frustrating. I have no javascript errors either
    – JasonDavis
    Commented Mar 16, 2012 at 6:51
  • This helped me too. I was wondering what the issue was. Although, it was not function.php for me. I had to remove them (?>) in all the php files I was including. Commented Mar 27, 2013 at 8:01
  • 2
    another reason might be that php5-gd was not installed. install the module and restart apache to get it working.
    – Reuben L.
    Commented May 18, 2014 at 12:32

Yes, the problem is the PHP closing tag (?>) in functions.php.

However, if in functions.php there are many inclusions which in turn include other PHP files, it is unthinkable to remove all PHP closing tag in all files.

So, my advice is add in the first line of functions.php the php function ob_start() and in the last line ob_end_clean() by removing the closing PHP tag.

Everything will work perfectly.

  • 3
    You'd suggest output buffering to mask the problem instead of correcting the PHP?
    – s_ha_dum
    Commented Jun 8, 2013 at 16:09
  • See the regex at the bottom of this post - stackoverflow.com/a/4499749/1982136 - to remove the closing PHP tag in all files.
    – Tim Malone
    Commented Apr 5, 2016 at 6:48

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