cloudflare / cloudflare/workers-rs
[Feature] support image resizing on CfProperties
- Dominant language
- Rust
- Stars
- 3.7k
- Forks
- 429
- Avg merge
- 20h 28m
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Description
Here's how an image resizing request looks like in JS:
```js
await fetch(url, {
cf: {image: {width: w, height: h, quality: q, fit: 'scale-down'}},
})
```
There are a few more of the within 'image' key. Here's the JS docs:
https://developers.cloudflare.com/workers//runtime-apis/request#requestinitcfproperties
and
https://developers.cloudflare.com/images/image-resizing/resize-with-workers
Adding support basically just means setting the according props on the JsValue in request_init.rs, right? And adding them in CfProperties.
Contributor guide
Assessment
This issue has not been assessed yet.