// add images with links

import { CreateDocx, OptionsImage } from "../../../build";
import * as fs from "fs";

const docx = new CreateDocx();

const fileJpg = fs.readFileSync("../../files/image.jpg");

const imageJpg: OptionsImage = {
    image: fileJpg,
    link: "https://www.phpdocx.com",
};
docx.addImage(imageJpg);

docx.save().then(contents => {
    fs.writeFileSync("addImage_3.docx", Buffer.from(contents));
});
