Support

Account

Home Forums General Issues Change File url output for CDN Reply To: Change File url output for CDN

  • Thanks for your help John,

    Unfortunately I haven’t had success as yet with my implementation, am I on the right track here?

    function my_acf_format_value( $value, $post_id, $field ) {
    	
    	$value = str_replace("http://testsite.com.au", "https://d2rfrrfrfr1.cloudfront.net", $value);
    	
    	return $value;
    }
    
    add_filter('acf/format_value/type=file', 'my_acf_format_value', 10, 3);