Skip to content

Commit b5deef1

Browse files
committed
Update serve-images-custom-paths.mdx
Simplify the expressions, the use of regex here does not make any sense.
1 parent 221b5f3 commit b5deef1

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/content/docs/images/transform-images/serve-images-custom-paths.mdx

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,12 @@ Leave the **Query** > **Rewrite to** > _Static_ field empty.
8989

9090
## Pass every image requested on your zone through Images
9191

92-
:::note
93-
This feature requires a Business or Enterprise plan to enable regular expressions in Transform Rules. Refer to [Cloudflare Transform Rules Availability](/rules/transform/#availability) for more information.
94-
:::
95-
9692
This example lets you transform every image that is requested on your zone with the `format=auto` option:
9793

9894
```txt
99-
(http.request.uri.path.extension matches "(jpg)|(jpeg)|(png)|(gif)") and (not (any(http.request.headers["via"][*] contains "image-resizing")))
95+
(http.request.uri.path.extension in {"jpg" "jpeg" "png" "gif"}) and (not (any(http.request.headers["via"][*] contains "image-resizing")))
10096
```
10197

10298
```txt title="Text in Path > Rewrite to > Dynamic"
103-
regex_replace(http.request.uri.path, "/(.*)", "/cdn-cgi/image/format=auto/${1}")
99+
concat("/cdn-cgi/image/format=auto", http.request.uri.path)
104100
```

0 commit comments

Comments
 (0)