For Workes & Pages, what is the name of the domain?
What is the issue or error you’re encountering
we’re experiencing an issue where our Cloudflare Worker, which handles image watermarking using the Image Transformation API, works perfectly in production but fails in the local development environment.
What steps have you taken to resolve the issue?
Implementation Details:
-Cloudflare Worker that processes images and adds watermarks
-Supabase Edge Function that acts as a middleware
-Frontend that triggers the image processing
What are the steps to reproduce the issue?
The core worker code that handles the image transformation:
const transformations = {
watermarked: {
width: 500,
fit: ‘scale-down’,
draw: [
{
url: watermarkUrl,
fit: ‘contain’,
width: 300,
height: 300,
opacity: 1,
},
],
},
xs: {
width: 250,
fit: ‘scale-down’,
// quality: 50,
},
md: {
width: 500,
fit: ‘scale-down’,
},
}