Skip to content
Dolan edited this page Jun 22, 2018 · 3 revisions

Adding images is very simple

Simply call the createImage method:

const image = doc.createImage([PATH_TO_YOUR_IMAGE]);

docx supports jpeg, jpg, bmp, gif and png

Check demo5.js for an example

Positioning

You can position the image with float, wrap or inline:

https://github.com/dolanmiu/docx/wiki/Positioning-of-Images

Clone this wiki locally