Image response using Imagemagick

Hi, I’m using imagemagick to resize and crop images,
I want to return the cropped image back to the client using the http request.

In a regular express app I would just do res.end(stdout, 'binary');
Where stdout is the binary result from imagemagick .resize method.

However, trying to return it using serverless does not seem to work.
How am I suppose to return the image back to the clients?


Can this help?

I’m not actually sure though, because it seems like that plugin is to deal with binary payloads (incoming requests), whereas you are talking about responding with a binary body.