youtube image
From YouTube: Using Public CDN in client side code

Description

Season 1 Episode 4 walks through implementing Public CDN in client-side code using the new page properties provided so that the URL is not hard-coded but it can still make use of the Public CDN.

New properties that can be used: “window._spPageContextInfo.publicCdnBaseUrl” in classic pages, display templates, etc. and “this.context.pageContext.legacyPageContext.publicCdnBaseUrl” in SPFX web parts for Classic and Modern.