Search code examples
node.jsexpresscroppie

Using "croppie" on front-end / What do I exactly need to do on back-end to actually crop the image?


How do I actually crop and compress (resize to snippet size) the image on back-end?

I'm using croppie on front-end: https://foliotek.github.io/Croppie/

I'm completely lost, small guidance would be very helpful.

Thanks!


Solution

  • Why do you want crop your pic on back-end? This operation should have be done in browser. When you use result({ type, size, format, quality, circle }) function, you can get data of cropped pic. If type is base64, you can save the data to file after base64_decode it.