Image uploads worked on a project's dev site, but not on its production environment. I checked 1 million times every possible Drupal settings, the file permissions and everything. Like, half a day of debugging and head-banging.

Thank god the autocomplete in my browser popped up this creepy URL
http://site.com/node/33/edit?q=/yui_editor/image_upload

Turns out the problem was a missing slash in 'yui_editor.js', line 38:

if (config.imgUpload == 1) {
   yui_img_uploader(myEditor, '/?q=/yui_editor/image_upload', 'files[upload]', config.base_path);
}

Just make sure there's a '/' before '?q'.

I hope this helps the less lucky ones out there :-)