addEventListener("fetch", event => { event.respondWith(handleRequest(event.request))})async function handleRequest(request) { let url = new URL(request.url) let options = { cf: { image: {quality: 40} } } const imageURL = url.searchParams.get("image") if (!imageURL) return new Response('Missing "image" value', { status: 400 }) const imageRequest = new Request(imageURL, { headers: request.headers }) return await fetch(imageURL, options);}