From a8a9bae733bc5d667bee4e887aaa371d746afe8d Mon Sep 17 00:00:00 2001 From: Ming Di Leom <2809763-curben@users.noreply.gitlab.com> Date: Sun, 6 Oct 2024 21:48:26 +0000 Subject: [PATCH] micropost: 7 Oct 2024 --- source/_posts/2024-10-07.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 source/_posts/2024-10-07.md diff --git a/source/_posts/2024-10-07.md b/source/_posts/2024-10-07.md new file mode 100644 index 0000000..8eb7b05 --- /dev/null +++ b/source/_posts/2024-10-07.md @@ -0,0 +1,6 @@ +--- +title: Image resizing/transformation in Cloudflare Pages Functions +date: 2024-10-07 +--- + +Cloudflare [Pages Functions](https://developers.cloudflare.com/pages/functions/) does not support Cloudflare Images [resizing/transformation](https://developers.cloudflare.com/images/transform-images/) either [directly](https://community.cloudflare.com/t/cloudflare-page-functions-and-image-resizing-not-working/637535) or through a Worker via [service binding](https://gitlab.com/curben/blog/-/blob/fd4c2043a6cdbe34a97b2b31e73b5e9f6e8eb32e/functions/images/%5B%5Bcatchall%5D%5D.js#L13). Instead, [`fetch()`](https://gitlab.com/curben/blog/-/blob/a6a43877763deaff99d369d513338456af9b31d9/functions/images/%5B%5Bcatchall%5D%5D.js) from a [Worker](https://gitlab.com/curben/blog/-/blob/fd4c2043a6cdbe34a97b2b31e73b5e9f6e8eb32e/cf-images/index.js) through a [route](https://gitlab.com/curben/blog/-/blob/3fc28281b232be917c4970318591656db52d4ac3/wrangler.toml#L7).