Skip to content

Commit a664497

Browse files
Merge pull request SharePoint#8335 from nanddeepn/patch-1
Formatting updates
2 parents 753b7dc + cca6661 commit a664497

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/spfx/image-helper-api.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Image Helper API
33
description: Learn how to use the Image Helper API in the SharePoint Framework to provide web-friendly optimized image links.
4-
ms.date: 02/25/2022
4+
ms.date: 07/25/2022
55
ms.localizationpriority: high
66
---
77
# Image Helper API
@@ -32,7 +32,7 @@ SharePoint's server-side image processing has a list of resolution breakpoints w
3232

3333
While you can specify any width to resize the image to, SharePoint will pick the nearest largest resolution breakpoint. For example, if you specify `width: 250`, the resized image width will be 400 px.
3434

35-
If you specify the optional `height` property, SharePoint the width isn't adjusted to the nearest breakpoint. But if the `height property is omitted, SharePoint automatically determines the height of the resized image using the width & width breakpoint while maintaining the aspect ratio for the image.
35+
If you specify the optional `height` property, the width isn't adjusted to the nearest breakpoint. But if the `height` property is omitted, SharePoint automatically determines the height of the resized image using the height & width breakpoint while maintaining the aspect ratio for the image.
3636

3737
> [!TIP]
3838
> Omitting the `height` property provides the quickest response from the SharePoint
@@ -51,7 +51,7 @@ Next, import it into your project where you plan to use the API:
5151
import { ImageHelper, IImageHelperRequest } from "@microsoft/sp-image-helper";
5252
```
5353

54-
Next, use the API to obtain a thumbnail image of an existing file in SharePoint. In this case, we've uploaded a file from the [Microsoft News Image Gallery](https://news.microsoft.com/imagegallery) site. In this example, we're using a file that's 1.2 MB in size with a resolution of 1920x1080... not an ideal web friendly format:
54+
Next, use the API to obtain a thumbnail image of an existing file in SharePoint. In this case, we've uploaded a file from the [Microsoft News Image Gallery](https://news.microsoft.com/imagegallery) site. In this example, we're using a file that's 1.2 MB in size with a resolution of 1920x1080 which is not an ideal web friendly format:
5555

5656
![Screenshot of the details panel of the original image.](../images/image-helper-api-01.png)
5757

@@ -89,9 +89,9 @@ This resized image is only 30 kB in size with a resolution of 400x225, a signifi
8989

9090
For the images to be available to be served from a private CDN, the following requirements must be met:
9191

92-
- the private CDN feature must be enabled
93-
- the source file must be available within an origin to the CDN
94-
- SharePoint's server-side preprocessing must know that the web part property is an image property
92+
- The private CDN feature must be enabled.
93+
- The source file must be available within an origin to the CDN.
94+
- SharePoint's server-side preprocessing must know that the web part property is an image property.
9595

9696
To make SharePoint's server-side processing aware of the image property, list the properties where image Urls are stored in the web part's **manifest.json** `imageLinkPropertyNames` property:
9797

0 commit comments

Comments
 (0)