const r2Path = generateR2Path(company_id, r2_id);
const imageFile = await env.R2.get(r2Path);
...
const transformationResponse = (
await env.IMAGES.input(imageFile.body)
.transform({
width: 1200,
height: undefined,
fit: "scale-down",
})
.output({
format: "image/jpeg",
})
).response();
const r2Path = generateR2Path(company_id, r2_id);
const imageFile = await env.R2.get(r2Path);
...
const transformationResponse = (
await env.IMAGES.input(imageFile.body)
.transform({
width: 1200,
height: undefined,
fit: "scale-down",
})
.output({
format: "image/jpeg",
})
).response();