Skip to content

Commit 5f6c0a6

Browse files
pilcrowonpaperHinata Masaki
andauthored
Add image API binding to template for image optimization (#1012)
Co-authored-by: Hinata Masaki <hinata@cloudflare.com>
1 parent a644ee1 commit 5f6c0a6

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.changeset/odd-pets-wash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
Add image binding to Wrangler configuration template file

create-cloudflare/next/wrangler.jsonc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@
1414
},
1515
"observability": {
1616
"enabled": true
17+
},
18+
"images": {
19+
// Enable image optimization
20+
// see https://opennext.js.org/cloudflare/howtos/image
21+
"binding": "IMAGES"
1722
}
1823
}

packages/cloudflare/templates/wrangler.jsonc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,10 @@
1818
// See https://developers.cloudflare.com/workers/wrangler/commands/#r2-bucket-create
1919
"bucket_name": "cache"
2020
}
21-
]
21+
],
22+
"images": {
23+
// Enable image optimization
24+
// see https://opennext.js.org/cloudflare/howtos/image
25+
"binding": "IMAGES"
26+
}
2227
}

0 commit comments

Comments
 (0)