Skip to content

Commit 981766b

Browse files
ToriLindsayOxyjun
andauthored
[Images] Nav changes - batch 2 (cloudflare#24961)
* [Images] Nav changes - batch 2 * Apply suggestions from code review Co-authored-by: Jun Lee <[email protected]> --------- Co-authored-by: Jun Lee <[email protected]>
1 parent 5bedfaa commit 981766b

File tree

3 files changed

+40
-19
lines changed

3 files changed

+40
-19
lines changed

src/content/docs/images/manage-images/serve-images/serve-from-custom-domains.mdx

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ title: Serve images from custom domains
44
sidebar:
55
order: 22
66
---
7+
import { DashButton } from "~/components";
78

89
Image delivery is supported from all customer domains under the same Cloudflare account. To serve images through custom domains, an image URL should be adjusted to the following format:
910

@@ -37,21 +38,25 @@ This example lets you rewrite a request from `example.com/images` to `example.co
3738

3839
To create a rule:
3940

40-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account and website.
41-
2. Go to **Rules** > **Overview**.
42-
3. Next to **URL Rewrite Rules**, select **Create rule**.
43-
4. Under **If incoming requests match**, select **Wildcard pattern** and enter the following **Request URL** (update with your own domain):
41+
1. In the Cloudflare dashboard, go to the **Account home** page.
42+
43+
<DashButton url="/?to=/:account/home" />
44+
45+
2. Select your domain.
46+
3. Go to **Rules** > **Overview**.
47+
4. Next to **URL Rewrite Rules**, select **Create rule**.
48+
5. Under **If incoming requests match**, select **Wildcard pattern** and enter the following **Request URL** (update with your own domain):
4449

4550
```txt
4651
https://example.com/images/*
4752
```
4853

49-
5. Under **Then rewrite the path and/or query** > **Path**, enter the following values (using your account hash):
54+
6. Under **Then rewrite the path and/or query** > **Path**, enter the following values (using your account hash):
5055

5156
- **Target path**: [`/`] `images/*`
5257
- **Rewrite to**: [`/`] `cdn-cgi/imagedelivery/<ACCOUNT_HASH>/${1}`
5358

54-
6. Select **Deploy** when you are done.
59+
7. Select **Deploy** when you are done.
5560

5661
### Advanced version
5762

@@ -63,13 +68,17 @@ This example lets you rewrite a request from `example.com/images/some-image-id/w
6368

6469
To create a rule:
6570

66-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/login) and select your account and website.
67-
2. Go to **Rules** > **Overview**.
68-
3. Next to **URL Rewrite Rules**, select **Create rule**.
69-
4. Under **If incoming requests match**, select **Custom filter expression** and then select **Edit expression**.
70-
5. In the text field, enter `(http.request.uri.path matches "^/images/.*$")`.
71-
6. Under **Path**, select **Rewrite to**.
72-
7. Select _Dynamic_ and enter the following in the text field.
71+
1. In the Cloudflare dashboard, go to the **Account home** page.
72+
73+
<DashButton url="/?to=/:account/home" />
74+
75+
2. Select your domain.
76+
3. Go to **Rules** > **Overview**.
77+
4. Next to **URL Rewrite Rules**, select **Create rule**.
78+
5. Under **If incoming requests match**, select **Custom filter expression** and then select **Edit expression**.
79+
6. In the text field, enter `(http.request.uri.path matches "^/images/.*$")`.
80+
7. Under **Path**, select **Rewrite to**.
81+
8. Select _Dynamic_ and enter the following in the text field.
7382

7483
```txt
7584
regex_replace(

src/content/docs/images/polish/activate-polish.mdx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ sidebar:
66

77
---
88

9-
import { Render } from "~/components"
9+
import { Render,DashButton } from "~/components"
1010

1111
Images in the [cache must be purged](/cache/how-to/purge-cache/) or expired before seeing any changes in Polish settings.
1212

@@ -18,10 +18,14 @@ Do not activate Polish and [image transformations](/images/transform-images/) si
1818

1919
:::
2020

21-
1. Log in to the [Cloudflare dashboard](https://dash.cloudflare.com/) and select the account and domain where you want to activate Polish.
22-
2. Go to **Speed** > **Optimization** > **Image Optimization**.
23-
3. Under **Polish**, select *Lossy* or *Lossless* from the drop-down menu. [*Lossy*](/images/polish/compression/#lossy) gives greater file size savings.
24-
4. (Optional) Select **WebP**. Enable this option if you want to further optimize PNG and JPEG images stored in the origin server, and serve them as WebP files to browsers that support this format.
21+
1. In the Cloudflare dashboard, go to the **Account home** page.
22+
23+
<DashButton url="/?to=/:account/home" />
24+
25+
2. Select the domain where you want to activate Polish.
26+
3. Select ****Speed** > **Optimization**** > **Image Optimization**.
27+
4. Under **Polish**, select *Lossy* or *Lossless* from the drop-down menu. [*Lossy*](/images/polish/compression/#lossy) gives greater file size savings.
28+
5. (Optional) Select **WebP**. Enable this option if you want to further optimize PNG and JPEG images stored in the origin server, and serve them as WebP files to browsers that support this format.
2529

2630
To ensure WebP is not served from cache to a browser without WebP support, disable any WebP conversion utilities at your origin web server when using Polish.
2731

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

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ head:
77
- tag: title
88
content: Serve images from custom paths
99
---
10+
import { DashButton } from "~/components";
1011

1112
You can use Transform Rules to rewrite URLs for every image that you transform through Images.
1213

@@ -16,7 +17,14 @@ This page covers examples for the following scenarios:
1617
- Modify existing URLs to be compatible with transformations in Images
1718
- Transform every image requested on your zone with Images
1819

19-
To create a rule, log in to the Cloudflare dashboard and select your account and website. Then, go to **Rules** > **Overview** and select **Create rule** next to **URL Rewrite Rules**.
20+
To create a rule:
21+
1. In the Cloudflare dashboard, go to the **Account home** page.
22+
23+
<DashButton url="/?to=/:account/home" />
24+
25+
2. Select your domain.
26+
3. Go to **Rules** > **Overview**.
27+
4. Select **Create rule** next to **URL Rewrite Rules**.
2028

2129
## Before you start
2230

0 commit comments

Comments
 (0)