WordPress 3.5: Setting custom “full URL path to files” in the Media Library?

As the recent changes in WordPress 3.5 removed the “full URL path to files” option from media library I am wondering how to set this option to a custom path now?

I need to set my “full URL path to files” for my media files to a custom subdomain. Can you guys help me out with finding a solution for this problem?

Regards,
faxxim

2

The option name is upload_url_path, and you can still filter it:

add_filter( 'pre_option_upload_url_path', 'wpse_77960_upload_url' );

function wpse_77960_upload_url()
{
    return 'http://subdomain.example.com/files';
}

Leave a Comment