[GH-ISSUE #75] Image transformations break SVG's #20

Closed
opened 2026-05-06 12:36:33 +02:00 by BreizhHardware · 3 comments

Originally created by @JustJoostNL on GitHub (Feb 25, 2026).
Original GitHub issue: https://github.com/cloudflare/vinext/issues/75

Currently when trying to show a local SVG:

[vinext] Image optimization error: Error: IMAGES_TRANSFORM_ERROR 9412: Could not resize the image: The requested file is not an image. Please make sure the server always serves an image (e.g. not an error page, or a login page)

Originally created by @JustJoostNL on GitHub (Feb 25, 2026). Original GitHub issue: https://github.com/cloudflare/vinext/issues/75 Currently when trying to show a local SVG: `[vinext] Image optimization error: Error: IMAGES_TRANSFORM_ERROR 9412: Could not resize the image: The requested file is not an image. Please make sure the server always serves an image (e.g. not an error page, or a login page)`
Author
Owner

@JustJoostNL commented on GitHub (Feb 25, 2026):

And also: This ReadableStream is disturbed (has already been read from), and cannot be used as a body.

<!-- gh-comment-id:3962073334 --> @JustJoostNL commented on GitHub (Feb 25, 2026): And also: `This ReadableStream is disturbed (has already been read from), and cannot be used as a body.`
Author
Owner

@southpolesteve commented on GitHub (Feb 26, 2026):

Fixed in v0.0.10. SVGs are now properly handled in the image optimization pipeline instead of being passed through to the Cloudflare Images transform API (which can't rasterize them). See PR #101.

<!-- gh-comment-id:3964359459 --> @southpolesteve commented on GitHub (Feb 26, 2026): Fixed in v0.0.10. SVGs are now properly handled in the image optimization pipeline instead of being passed through to the Cloudflare Images transform API (which can't rasterize them). See PR #101.
Author
Owner

@JustJoostNL commented on GitHub (Feb 26, 2026):

@southpolesteve When rendering a SVG now, I get this:
The requested resource is not an allowed image type, I think it would be better to just return the SVG instead? Otherwise it would be impossible.
Request path was: _vinext/image?url=/icon.svg

<!-- gh-comment-id:3964725744 --> @JustJoostNL commented on GitHub (Feb 26, 2026): @southpolesteve When rendering a SVG now, I get this: `The requested resource is not an allowed image type`, I think it would be better to just return the SVG instead? Otherwise it would be impossible. Request path was: _vinext/image?url=/icon.svg
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#20
No description provided.