Answer the question
In order to leave comments, you need to log in
Merge-images js (merge two images into one)?
Guys, I need to merge two pictures into one using javascript.
I found such a library https://github.com/lukechilds/merge-images
I do everything as instructed, but I get this error.
Uncaught SyntaxError: Unexpected identifier
I use the code as is.
<script src="https://unpkg.com/merge-images"></script>
<script type="text/javascript">
import mergeImages from 'merge-images';
mergeImages(['body.png', 'eyes.png', 'mouth.png']).then(b64 => document.querySelector('img').src = b64);
</script>
<img src="">
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question