Jakub
Jakub
CDCloudflare Developers
Created by Jakub on 2/16/2024 in #workers-help
Image Transformation with Workers - what I'm doing wrong?
I'm trying to apply some blur to an image, but Worker results with the original image instead transformed. What's wrong with my setup? I'm saving & deploying the app and testing it outside Dashboard Preview.
export default {
async fetch(request, env, ctx) {

const url = new URL(request.url)
const imageUrl = url.searchParams.get("image");

return fetch(imageUrl, {
cf: {
image: {
blur: 100,
},
},
});
},
};
export default {
async fetch(request, env, ctx) {

const url = new URL(request.url)
const imageUrl = url.searchParams.get("image");

return fetch(imageUrl, {
cf: {
image: {
blur: 100,
},
},
});
},
};
10 replies