Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Unsupported image types for node - webp #10439

Open
4 tasks done
bvkimball opened this issue Feb 13, 2025 · 1 comment
Open
4 tasks done

[Feature]: Unsupported image types for node - webp #10439

bvkimball opened this issue Feb 13, 2025 · 1 comment

Comments

@bvkimball
Copy link

CheckList

  • I agree to follow this project's Code of Conduct
  • I have read and followed the Contributing Guide
  • I have searched and referenced existing issues, feature requests and discussions
  • I am filing a FEATURE request.

Description

I would like to inject extra image processing if need into my Images when i render an image on the Server using fabricjs/node. This would be to convert unsupported image types to a supported format. I know this is a limitation of node-canvas, but since fabric is an abstraction over that it seem like this would be the best place to inject code.

This library https://www.npmjs.com/package/webp-wasm. show how you can decode webp data for node-canvas.

I dont think this library should be included but if a hook into the proper place could be set so that we can extend the functionality if we need to.

Existing closed issue - #7677

Current State

Currently i rewrite all the URLs in the Canvas to point to a service that will convert not supported images to png, this error prone. I really don't want to be inspecting the canvas json as much as i am.

Additional Context

Existing closed issue - #7677
This library https://www.npmjs.com/package/webp-wasm. show how you can decode webp data for node-canvas.

@asturur
Copy link
Member

asturur commented Feb 14, 2025

Hello @bvkimball in the currect release 6.6.0 if you look at the image supported types you find a link to an issue on node-canvas that explains you how to do that.

#10435

https://github.com/fabricjs/fabric.js/pull/10435/files#diff-a2ca4295c4b9b0a677c07db27810483a1abf0d671387d14ab4258f6bdfd72cfaR48

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants