Apr 3, 2008
Tip and Trick Editorial

Disable WordPress 2.5 Flash Image/Video/Media Uploader with Plugin

WordPress 2.5 features a new media (including image, video and file) uploader that built on Adobe Flash technology which supports multiple files uploading to the gallery at one time and upload progress indicator bar. Unfortunately, the media uploader has numerous bugs and problems, which basically make the Flash uploader not working, or not successfully uploading the files.

There are a few symptoms for the broken Flash uploader error. For example, blogger can adds the files to upload, but nothing happen or progress to upload the selected files. Sometimes the upload process manages to get to “Crunching” but stop working after, or comes out with HTTP error, or even worse, freeze and crash the browser to not responding. Other reported problems including the the add media buttons disappearing or not showing up.

WordPress Support has listed several steps to check and fix the possible problems that cause user cannot upload photos, images, videos, music and other media files in WordPress 2.5. If the Flash based media uploader does not work after whatever effort, workaround and solution been done, including some bug fixes, such as disable conflicting plugin and bypass mod_security to try to solve the error and issue, there is a plugin to force disable (or later re-enable) the Flash uploader.

To enable the Flash media uploader to be disabled via plugin, a filter has to be added to Flash uploader (only on WordPress version 2.5.x, as the change is set to implement in milestone version 2.6). To do so, edit the \wp-admin\includes\media.php file using your favorite text editor directly by logging in to server or locally (has to be uploaded and overwrite replaced the original media.php file). Change the following code at around line 765 to 770.

Before:
$flash_action_url = get_option('siteurl') . "/wp-admin/async-upload.php";

// If Mac and mod_security, no Flash. :(
$flash = true;
if ( false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && apache_mod_loaded('mod_security') )
$flash = false;

After:
$flash_action_url = get_option('siteurl') . "/wp-admin/async-upload.php";

$flash = apply_filters('flash_uploader', true);
// If Mac and mod_security, no Flash. :(
$flash = true;
if ( $flash && false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'mac') && apache_mod_loaded('mod_security') )
$flash = false;

Then, download the no-flash-uploader.php, and upload the PHP file to \wp-content\plugins\ directory, and activate the plugin via WordPress administration page. After activating to disable the Flash media uploader, the uploader will no longer make use of Flash technology, and all advanced features that come with it also been disabled.



  • betzy

    do you have any idea how to disable the default flash player for mp3 links ?? i want to show the mp3 link but the wordpress put there a flash player :( (

  • http://nouvelles.equipespectra.ca Denis

    This was really helpfull. Thanks !

  • Michele

    grazie mille, questo post è stato provvidenziale!

  • kookimebux

    Hello. And Bye. :)

  • http://www.renehasp.com Rene Hasprunar

    Here is the fix that worked for me.

    fryewiles

    Member

    Posted 12 hours ago #

    I had the same problem, and I was able to fix it by reuploading:

    /wp-includes/js/swfupload/

    And then clearing my browser cache.

  • http://codeandmore.com Tien Do Xuan

    After should be:

    $flash_action_url = get_option('siteurl') . "/wp-admin/async-upload.php";

    $flash = apply_filters('flash_uploader', true);

    // If Mac and mod_security, no Flash. :(

    if ( $flash && false !== strpos(strtolower($_SERVER['HTTP_USER_AGENT']), ‘mac’) && apache_mod_loaded(’mod_security’) )

    $flash = false;

  • Taras Di

    The above instructions do not work for me… the flash uploader still gets called.

    I noticed, by debugging the code, that by the time the function that you edit in your instructions gets called, the browser is already displaying the 'loading upload form' bar (ie: the screen has turned black).

    I've tried clearing the cache, and I'm using FF3.. any ideas on what could be going wrong?

  • http://Newyorkamera.com sage

    It was much easier to revert to the previous version of wordpress, however, I have another problem.( I still cannot imbed video. . .) I design the photos to be a specific size on the blog page but have found that the uploader puts an 'alt' size into the html that takes precedence in the presentation, unifying all the photo sizes to a smaller format. When I finish writing, I have to go back through the code and remove all the 'alt's from the code so that all is seen as I planned when I publish.

  • Mario

    Is it possible to totally remove the media buttons from the Write Post page? I don't want users to use or even see these things. I also want to remove the text editor buttons too!

  • Pingback: Upload Problems with Wordpress 2.5 | Batang Yagit

  • admin

    Have you tried to re-upload wordpress files? Probably some files have corrupted.

  • http://Newyorkamera.com sage

    I have just folowed all of your instructions and I am still getting this error: Fatal error: Call to undefined function wp_constrain_dimensions() in /home2/newyorka/public_html/wp-admin/includes/image.php on line 173

    I have altered the htaccess to turn of the mod thing and nothing has worked on my Mac (10.5) in safari or FF

    Anything else I can do?

    thanks

  • admin

    What error message you have?

  • warriorfr

    Thank you very much !

    Now I can send files, but I still get the same error message I have with IE7.

    However even with this error, the upload works.

  • Pingback: Disable WordPress 2.5 Flash Image/Video/Media Uploader with Plugin (Excerpt) » My Digital Life

  • Pingback: Tambayan.ph » Fix the media uploader when using IE7 on the latest WordPress 2.5

  • Pingback: Fix WordPress 2.5 Image or Media Flash Uploader Not Working Issue in IE7 » Tip and Trick