3

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

/_api/Web/Lists/getbytitle('ListTile')/Items?$select=Image

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?

  • The Office365 CDN approach is still a SharePoint Document Library, and thus slow (response times 200+ms are not uncommon, as can be seen in the PnP Webcast) You can create your own CDN on any HTTPS server and response times will drop tenfold – Danny '365CSI' Engelman Dec 18 '17 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.