@@ -18,8 +18,8 @@ NETLIFY_IMAGE_CDN = "true"
18
18
19
19
[images ]
20
20
remote_images = [
21
- ' ^ https:\\/\\ /example1\\ .com\\ /.*' ,
22
- ' ^ https:\\/\\ /example2\\ .com\\ /.*'
21
+ ' https:/ /example1.com/.*' ,
22
+ ' https:/ /example2.com/.*'
23
23
]
24
24
```
25
25
@@ -33,7 +33,7 @@ configuration of it.
33
33
remote_images = [
34
34
# <your-contentful-space-id> is specified in the `spaceId` option for the
35
35
# gatsby-source-contentful plugin in your gatsby-config file.
36
- " ^ https:\\ / \\ /images\\ .ctfassets\\ .net\\ /<your-contentful-space-id>\\ /.*"
36
+ " https:/ /images.ctfassets.net/<your-contentful-space-id>/.*"
37
37
]
38
38
```
39
39
@@ -44,7 +44,7 @@ configuration of it.
44
44
remote_images = [
45
45
# <your-drupal-base-url> is speciafied in the `baseUrl` option for the
46
46
# gatsby-source-drupal plugin in your gatsby-config file.
47
- " ^ <your-drupal-base-url>\\ /.*"
47
+ " <your-drupal-base-url>/.*"
48
48
]
49
49
```
50
50
@@ -56,21 +56,14 @@ configuration of it.
56
56
# <your-wordpress-url> is specified in the `url` option for the
57
57
# gatsby-source-wordpress plugin in your gatsby-config file.
58
58
# There is no need to include `/graphql in the path here`
59
- " ^ <your-wordpress-url>\\ /.*"
59
+ " <your-wordpress-url>/.*"
60
60
]
61
61
```
62
62
63
63
Above examples are the most likely ones to be needed. However if you configure
64
64
your CMS to host assets on different domain or path, you might need to adjust
65
65
the patterns accordingly.
66
66
67
- Keep in mind that you will need to escape special regular expression symbols to
68
- avoid creating too permisible patterns:
69
-
70
- - ` . ` should be escaped as ` \\. ` (dot)
71
- - ` / ` should be escaped as ` \\/ ` (slash)
72
- - your rule should start with ` ^ ` so domain matching is exact
73
-
74
67
## How it works
75
68
76
69
When using the Image CDN, Gatsby generates URLs of the form
0 commit comments