SharePoint / SharePoint/sp-dev-docs

List Formatting: Disallowed external images appear on list forms

Open
#10,602 2 comments 0 reactions 1 assignee View on GitHub

@Ashlesha-MSFT is already working on this.

Since Jan 20, 2026.

area:list-formatting sharepoint-developer-support type:bug-confirmed
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?

Declarative list formatting

Developer environment

Windows

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

No response

Describe the bug / error

I configured HTML Field Security > Allow external iframes to “Don't allow contributors to insert iframes from external domains.

Image

Next, I applied column formatting that displays an external image to a list column. As expected, the external image is not displayed in the list view, since external images are not allowed.

Image

However, when opening the list form, the external image is displayed.

Image Image

Is this expected behavior, or is this a bug?


Related Issue

Related Document

Steps to reproduce
  1. HTML Field Security > Allow external iframes to “Don't allow contributors to insert iframes from external domains

  2. Set the following JSON for formatting any column:

    {
      "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
      "elmType": "img",
      "attributes": {
        "src": "https://github.com/pnp/media/raw/master/parker/pnp/300w/parker.png"
      }
    }
    
  3. Set any value in the formatted column

  4. Open the form

Expected behavior

External images are not allowed, so they should not be displayed even on the form.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.