In Nodejs sharp package how to add two image into a single image?

Viewed 1054

I tried to combine two images into a single image using sharp package in NodeJS but i cant is there any ways to done this with sharp package

2 Answers

You can put an image in front to other with the next code:

sharp(pathToBaseImage)
  .composite([{ input: bufferFrontImage }])
  .sharpen()
  .toBuffer()
Related