Skip to content

[Feature] support image resizing on CfProperties #232

Open
@seeekr

Description

@seeekr

Is there an existing issue for this?

  • I have searched the existing issues

Description

Here's how an image resizing request looks like in 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions