5 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
you can import an npm package into an action (you might need to put
"use node"
at the top) and use it to process the image.for example, this one looks popular: https://www.npmjs.com/package/sharp .
i haven't used it myself, so be sure to let us know if you hit issues. in general convex functions can run arbitrary javascript and npm has a large assortment of packages you can use
npm
sharp
High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, GIF, AVIF and TIFF images. Latest version: 0.33.5, last published: a month ago. Start using sharp in your project by running
npm i sharp
. There are 4806 other projects in the npm registry using sharp.By offering an API that simplifies caching and CDN distribution, you could significantly enhance the current Storage service. This approach would provide a competitive edge similar to what users currently pay for in services like Cloudinary, Cloudflare Images, Supabase Storage, Imgix, Imagekit... Given that everything in Convex is designed with a great developer experience (DX) in mind, this would be a valuable addition.
agreed! we have something underway. hoping to get an early version out soon