Anyone know a good npm library for
Anyone know a good npm library for cropping images in Convex action functions? keep running into errors with the usual suspects (sharp lib)
4 Replies
This exists, I know nothing about it but the docs look nice: https://jimp-dev.github.io/jimp/. Unless you're actually letting users crop images in-app, I'd also consider using something like Cloudflare's image cdn to serve the sizes you want. Curious what you're running into with sharp though, especially in node env.
I'm going to give that a try, thank you. This is for a back office function not end user initiated croppings in app.
Error log: https://pastebin.com/v5JB5QCk
Maybe I missed something with the platform: 'node' call out
Pastebin
⠋ Preparing Convex functions...✘ [ERROR] Could not resolve "node:ut...
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Recent tip from Nicolas, mark sharp as an external package: https://discord.com/channels/1019350475847499849/1019350478817079338/1347637114195415130
Thank you, everything working now with sharp, thanks!! 😄