Skip to content
This repository was archived by the owner on Feb 10, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/long-suits-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@astrojs/cloudflare': patch
---

Enables onerror redirect for Cloudflare image service
2 changes: 1 addition & 1 deletion packages/cloudflare/src/entrypoints/image-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
Expand Down