Skip to content

Commit 07bd1ad

Browse files
authored
Using WranglerConfig component
1 parent 2409063 commit 07bd1ad

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/content/docs/images/tutorials/optimize-user-uploaded-image.mdx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ sidebar:
66
order: 1
77
---
88

9+
import { WranglerConfig } from "~/components"
10+
11+
912
In this guide, you will build an app that accepts image uploads, overlays the image with a visual watermark, then stores the transformed image in your R2 bucket.
1013

1114
---
@@ -40,7 +43,8 @@ To start, you will need to set up your project to use the following resources on
4043

4144
Configure your `wrangler.toml` file to add the Images, R2, and Assets bindings:
4245

43-
```txt
46+
<WranglerConfig>
47+
```toml
4448
[images]
4549
binding = "IMAGES"
4650

@@ -53,6 +57,7 @@ directory = "./<DIRECTORY>"
5357
binding = "ASSETS"
5458
```
5559

60+
</WranglerConfig>
5661
Replace `<BUCKET>` with the name of the R2 bucket where you will upload the images after they are transformed. In your Worker code, you will be able to refer to this bucket using `env.R2.`
5762

5863
Replace `./<DIRECTORY>` with the name of the project's directory where the overlay image will be stored. In your Worker code, you will be able to refer to these assets using `env.ASSETS`.

0 commit comments

Comments
 (0)