I am creating a SPFx webpart in which I fetch images from a library and bind them to a carousel. I am doing a
GET request using REST API
To make the webpart load faster, I want to use the Office 365 CDN capability to rewrite Image URLs to CDN.
Microsoft States that "Image fields in SPList REST API (RenderListDataAsStream) results being rewritten to CDN Urls." It also states that "Use the new property ImageFieldsToTryRewriteToCdnUrls to provide a comma separated list of Fields."
Do you have code sample of how to do this?