catdad-experiments / heic-convert

🤳 convert heic/heif images to jpeg and png
245 stars 24 forks source link

Browser vs Server Side Support #15

Closed LeoWW closed 9 months ago

LeoWW commented 3 years ago

Hi, was wondering if this library was meant for Server-Side usage or Browser usage? Thanks!

catdad commented 3 years ago

It should work fine for both, as long as you are compiling with something webpack/rollup/etc. to provide proper browser fallbacks.

Though, it is worth mentioning that this module is not really optimized for small bundle size for browsers. You might be better off using heic-decode and then encoding the data using canvas. In addition to not bundling some bulky modules, that would also actually work faster than using jpeg-js and pngjs.