Make WordPress Core

Opened 7 years ago

Last modified 6 weeks ago

#40687 new defect (bug)

pre_option_upload_url_path filter no longer working

Reported by: qrokes's profile QROkes Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.4
Component: General Keywords:
Focuses: Cc:


“pre_option_upload_url_path” filter is not working since WP 4.7.

This is my use case that used to work like a charm before, it's pretty simple and seems like an issue in the wp_upload_dir() function in /wp-includes/functions.php file.

function cdn_url() {
  return 'http://cdn.domain/wp-content/uploads';
add_filter( 'pre_option_upload_url_path', 'cdn_url' );

Change History (3)

#1 @Nomafin
7 years ago

Same problem here. I've tried to find out what causes the bug in the core but so far haven't found anything.

#2 @donmhico
5 years ago

This bug is kind of weird. I can't find pre_option_upload_url_path. I tried searching on

This might help though -

#3 @QROkes
6 weeks ago

Update: Now it's partially working''

For images, it only updates the 'srcset' but not the 'src'.

Note: See TracTickets for help on using tickets.