SharePoint / SharePoint/sp-dev-docs
SPFx 1.21.1 version has issue loading images from SharePoint public CDN
Open
@Ashlesha-MSFT is already working on this.
Since Jul 30, 2025.
area:spfx
Needs: Author Feedback
sharepoint-developer-support
type:bug-suspected
- Dominant language
- PowerShell
- Stars
- 1.4k
- Forks
- 1.1k
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 12
Description
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
macOS
What browser(s) / client(s) have you tested
- 💥 Internet Explorer
- 💥 Microsoft Edge
- 💥 Google Chrome
- 💥 FireFox
- 💥 Safari
- mobile (iOS/iPadOS)
- mobile (Android)
- not applicable
- other (enter in the "Additional environment details" area below)
Additional environment details
- browser version : 138.0.7204.169
- SPFx version: 1.21.1
- Node.js version : v22.17.0
Describe the bug / error
SPFx 1.21.1 version has issue loading images from SharePoint public CDN when png/jpg is used. Works when we use svg file.
Steps to reproduce
Use SPFx 1.21.1 & create a basic webpart which loads image (png/jpg) from SharePoint Public CDN (enabled through powershell).
If we use svg file instead it works.
Expected behavior
Expected behavior is that the image should load regardless of type which was working before the SPFx upgrade.
Note: It works when we use svg file.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.