Skip to content

Commit affdd49

Browse files
Merge pull request SharePoint#8872 from pKalaga/main
update for img src tags
2 parents 2bbd985 + f78bf5c commit affdd49

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docs/declarative-customization/formatting-syntax-reference.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Formatting syntax reference
33
description: Formatting syntax reference
4-
ms.date: 12/28/2022
4+
ms.date: 04/08/2023
55
ms.localizationpriority: high
66
---
77

@@ -14,7 +14,7 @@ Specifies the type of element to create. Valid elements include:
1414
- div
1515
- span
1616
- a
17-
- img
17+
- [img](#img-src-security)
1818
- svg
1919
- path
2020
- button
@@ -26,14 +26,21 @@ Any other value will result in an error.
2626
### filepreview
2727

2828
Use the special elmType `filepreview` in conjunction with the `src` attribute set to [`@thumbnail.<Size>`](#thumbnails) to view thumbnails for files in your document libary.
29-
If the thumbnail loads successfully, a small [brand type icon](https://developer.microsoft.com/en-us/fluentui#/styles/web/office-brand-icons) is visible on the bottom left. If the thumbanil fails to load (or if the file type doesn't support thumbnails), a [file type icon](https://developer.microsoft.com/en-us/fluentui#/styles/web/file-type-icons) is shown instead.
29+
If the thumbnail loads successfully, a small [brand type icon](https://developer.microsoft.com/fluentui#/styles/web/office-brand-icons) is visible on the bottom left. If the thumbanil fails to load (or if the file type doesn't support thumbnails), a [file type icon](https://developer.microsoft.com/fluentui#/styles/web/file-type-icons) is shown instead.
3030

3131
```json
3232
"elmType": "filepreview",
3333
"attributes": {
3434
"src": "@thumbnail.medium"
3535
}
3636
```
37+
### img src security
38+
39+
Images from the following domains are allowed:
40+
- tenant ___domain, configured multi-geo domains and vanity domains (company.sharepoint.com)
41+
- cdn.office.net, akamaihd.net, static2.sharepointonline.com CDNs
42+
43+
most other external image sources are blocked by default in custom formatters. To include external images and allow specific domains or CDNs, the ___domain needs to be added to a site-level setting - [HTMLFieldSecurity](https://support.microsoft.com/office/allow-or-restrict-the-ability-to-embed-content-on-sharepoint-pages-e7baf83f-09d0-4bd1-9058-4aa483ee137b)
3744

3845
## txtContent
3946

0 commit comments

Comments
 (0)