Skip to content

Commit b540c0d

Browse files
committed
Default referrerPolicy: no-referrer-when-downgrade
1 parent 30d7542 commit b540c0d

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Image/Image.astro

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const {
1414
usePlaceholder = true,
1515
sizes,
1616
srcSetCandidates = [0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4],
17-
referrerPolicy = 'strict-origin',
17+
referrerPolicy = 'no-referrer-when-downgrade',
1818
} = Astro.props;
1919
2020
const placeholderStyle =

src/Image/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@ Here's a complete recap of what `responsiveImage` offers:
122122
| sizes | string | undefined | :x: | The HTML5 [`sizes`](https://web.dev/learn/design/responsive-images/#sizes) attribute for the image (will be used `data.sizes` as a fallback) |
123123
| usePlaceholder | Boolean | true | :x: | Whether the image should use a blurred image placeholder |
124124
| srcSetCandidates | Array<number> | [0.25, 0.5, 0.75, 1, 1.5, 2, 3, 4] | :x: | If `data` does not contain `srcSet`, the candidates for the `srcset` attribute of the image will be auto-generated based on these width multipliers |
125-
| referrerPolicy | string | `strict-origin` | :x: | Defines which referrer is sent when fetching the image. Defaults to `strict-origin` to give more useful stats in DatoCMS Project Usages |
125+
| referrerPolicy | string | `no-referrer-when-downgrade` | :x: | Defines which referrer is sent when fetching the image. Defaults to `no-referrer-when-downgrade` to give more useful stats in DatoCMS Project Usages |

src/Image/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export type ImageProps = {
6767
* Defines which referrer is sent when fetching the image
6868
* Read more: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img#referrerpolicy
6969
*
70-
* Defaults to `strict-origin` to give more useful stats in DatoCMS Project Usages
70+
* Defaults to `no-referrer-when-downgrade` to give more useful stats in DatoCMS Project Usages
7171
**/
7272
referrerPolicy?: JSX.HTMLAttributeReferrerPolicy;
7373
};

0 commit comments

Comments
 (0)