We’re rewarding the question askers & reputations are being recalculated! Read more.
2 replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
source | link

This answerThis answer has solved the problem.

You need to add this to your functions.php file.

/**
* Custom media upload URL
* @link httphttps://wordpress.stackexchange.com/questions/77960/wordpress-3-5-setting-custom-full-url-path-to-files-in-the-media-library
*/
add_filter( 'pre_option_upload_url_path', 'upload_url' );

function upload_url() {
    return 'http://static.yourdomain.com/wp-content/uploads';
}

There's no need to add the original snippet to wp-config.php.

This answer has solved the problem.

You need to add this to your functions.php file.

/**
* Custom media upload URL
* @link http://wordpress.stackexchange.com/questions/77960/wordpress-3-5-setting-custom-full-url-path-to-files-in-the-media-library
*/
add_filter( 'pre_option_upload_url_path', 'upload_url' );

function upload_url() {
    return 'http://static.yourdomain.com/wp-content/uploads';
}

There's no need to add the original snippet to wp-config.php.

This answer has solved the problem.

You need to add this to your functions.php file.

/**
* Custom media upload URL
* @link https://wordpress.stackexchange.com/questions/77960/wordpress-3-5-setting-custom-full-url-path-to-files-in-the-media-library
*/
add_filter( 'pre_option_upload_url_path', 'upload_url' );

function upload_url() {
    return 'http://static.yourdomain.com/wp-content/uploads';
}

There's no need to add the original snippet to wp-config.php.

1
source | link

This answer has solved the problem.

You need to add this to your functions.php file.

/**
* Custom media upload URL
* @link http://wordpress.stackexchange.com/questions/77960/wordpress-3-5-setting-custom-full-url-path-to-files-in-the-media-library
*/
add_filter( 'pre_option_upload_url_path', 'upload_url' );

function upload_url() {
    return 'http://static.yourdomain.com/wp-content/uploads';
}

There's no need to add the original snippet to wp-config.php.