Skip to content

Commit 3d85eb7

Browse files
dcpenamaxvp
andauthored
[Images] Misc updates (#20231)
* Misc updates * Update src/content/docs/images/transform-images/bindings.mdx Co-authored-by: Max Phillips <[email protected]> --------- Co-authored-by: Max Phillips <[email protected]>
1 parent b61b723 commit 3d85eb7

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

src/content/docs/images/reference/troubleshooting.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ When resizing fails, the response body contains an error message explaining the
3737
* 9420 — The origin server redirected to an invalid URL. Confirm settings at your origin and try again.
3838
* 9421 — The origin server redirected too many times. Confirm settings at your origin and try again.
3939
* 9422 - The transformation request is rejected because the usage limit was reached. If you need to request more than 5,000 unique transformations, upgrade to an Images Paid plan.
40+
* 9432 — The Images Binding is not available using legacy billing. Your account is using the legacy Image Resizing subscription. To bind Images to your Worker, you will need to update your plan to the Images subscription in the dashboard.
4041
* 9504, 9505, & 9510 — The origin server could not be contacted because the origin server may be down or overloaded. Try again later.
4142
* 9523 — The `/cdn-cgi/image/` resizing service could not perform resizing. This may happen when an image has invalid format. Use correctly formatted image and try again.
4243
* 9524 — The `/cdn-cgi/image/` resizing service could not perform resizing. This may happen when an image URL is intercepted by a Worker. As an alternative you can [resize within the Worker](/images/transform-images/transform-via-workers/). This can also happen when using a `pages.dev` URL of a [Cloudflare Pages](/pages/) project. In that case, you can use a [Custom Domain](/pages/configuration/custom-domains/) instead.

src/content/docs/images/transform-images/bindings.mdx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,12 @@ Within your Worker code, you can interact with this binding by using `env.IMAGES
3838

3939
### `.transform()`
4040

41-
- Defines how an image should be optimized and manipulated through [`fetch()` options](/images/transform-images/transform-via-workers/#fetch-options) such as `width`, `height`, and `blur`.
41+
- Defines how an image should be optimized and manipulated through [parameters](/images/transform-images/transform-via-workers/#fetch-options) such as `width`, `height`, and `blur`.
4242

4343
### `.draw()`
4444

4545
- Allows [drawing an image](/images/transform-images/draw-overlays/) over another image.
46-
- The overlaid image can be manipulated using `opacity`, `repeat`, `top`, `left`, `bottom`, and `right`. To apply other `fetch()` options, you can pass a child `.transform()` function inside this method.
46+
- The overlaid image can be manipulated using `opacity`, `repeat`, `top`, `left`, `bottom`, and `right`. To apply other parameters, you can pass a child `.transform()` function inside this method.
4747

4848

4949
### `.output()`
@@ -66,6 +66,10 @@ await env.IMAGES.input(stream)
6666
return response;
6767
```
6868

69+
### `.info()`
70+
71+
- Outputs information about the image, such as `format`, `fileSize`, `width`, and `height`.
72+
6973
In this example, the transformed image is outputted as a WebP.
7074

7175
Responses from the Images binding are not automatically cached. Workers lets you interact directly with the Cache API to customize cache behavior using Workers. You can implement logic in your script to store transformations in Cloudflare’s cache.

src/content/docs/images/transform-images/draw-overlays.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ const response = await env.IMAGES.input(img.body)
8888
return response;
8989
```
9090

91-
To apply [other `fetch()` options](/images/transform-images/transform-via-workers/) to the overlaid image, you can pass a child `.transform()` function inside the `.draw()` request.
91+
To apply [parameters](/images/transform-images/transform-via-workers/) to the overlaid image, you can pass a child `.transform()` function inside the `.draw()` request.
9292

9393
In the example below, the watermark is manipulated with `rotate` and `width` before being drawn over the base image with the `opacity` and `rotate` options.
9494

0 commit comments

Comments
 (0)