Image is not sized

I’m trying to resize image with worker and only one worker I’m running ,its returning the image without resizing it. Highly appreciate your solutions for this, find my code below

addEventListener(“fetch”, event => {
event.respondWith(handleRequest(event.request))
})

async function handleRequest(request) {
let url = new URL(request.url)

let options = { cf: { image: {} } }
ptions.cf.image.width= 200
options.cf.image.height= 200

const imageURL = “mybase url”+imageName

const imageRequest = new Request(imageURL, {
headers: request.headers
})

return fetch(imageRequest, options)
}

Are you at least on a Business plan?

If not, you can’t use it.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.