Switching image URLs with multiple CDN subdomains
-
When images on a site are placed on multiple CDN subdomains, how can the code referenced in the API (https://yoast.com/wordpress/plugins/seo/api/) be implemented?:
function wpseo_cdn_filter( $uri ) { return str_replace( 'https://example.com', 'https://cdn.example.com', $uri ); } add_filter( 'wpseo_xml_sitemap_img_src', 'wpseo_cdn_filter' );
What if for instance you have image content served on both https://cdn-1.example.com, https://cdn-2.example.com, https://cdn-3.example.com,…?
- The topic ‘Switching image URLs with multiple CDN subdomains’ is closed to new replies.