summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Eric Kwoka <43540491+ekwoka@users.noreply.github.com> 2025-02-21 11:40:27 +0400
committerGravatar GitHub <noreply@github.com> 2025-02-21 07:40:27 +0000
commit065157cac73e176cd6da9b8b0a157359a20ebebd (patch)
treec16d6c0e1bf9ed7287e6e877cc8a9086638b1748
parent7cb718969801f81892be0726faf1935d0c7e9bfd (diff)
downloadastro-065157cac73e176cd6da9b8b0a157359a20ebebd.tar.gz
astro-065157cac73e176cd6da9b8b0a157359a20ebebd.tar.zst
astro-065157cac73e176cd6da9b8b0a157359a20ebebd.zip
feat(cloudflare): Includes onerror passthrough (#13201)
* ✨ Includes onerror passthrough param * :package: Includes Changeset
-rw-r--r--.changeset/gentle-rings-confess.md5
-rw-r--r--packages/integrations/cloudflare/src/entrypoints/image-service.ts2
2 files changed, 6 insertions, 1 deletions
diff --git a/.changeset/gentle-rings-confess.md b/.changeset/gentle-rings-confess.md
new file mode 100644
index 000000000..c4089b2f0
--- /dev/null
+++ b/.changeset/gentle-rings-confess.md
@@ -0,0 +1,5 @@
+---
+'@astrojs/cloudflare': patch
+---
+
+Includes onerror passthrough param for Cloudflare Image Service
diff --git a/packages/integrations/cloudflare/src/entrypoints/image-service.ts b/packages/integrations/cloudflare/src/entrypoints/image-service.ts
index fa970c45f..d4cf8ff93 100644
--- a/packages/integrations/cloudflare/src/entrypoints/image-service.ts
+++ b/packages/integrations/cloudflare/src/entrypoints/image-service.ts
@@ -7,7 +7,7 @@ import { isESMImportedImage, isRemoteAllowed } from '../utils/assets.js';
const service: ExternalImageService = {
...baseService,
getURL: (options, imageConfig) => {
- const resizingParams = [];
+ const resizingParams = ['onerror=redirect'];
if (options.width) resizingParams.push(`width=${options.width}`);
if (options.height) resizingParams.push(`height=${options.height}`);
if (options.quality) resizingParams.push(`quality=${options.quality}`);