php - Is there way to insert an image (html) to PHPWord Template?

one text

Solution:

First of all, which version of PHPWord are you using? If you are using the latest version(as of Oct 2020), you can use this function:

https://phpword.readthedocs.io/en/latest/templates-processing.html#setimagevalue

Adding image to a Word template is as easy as:

setImageValue(<tag>, <path to file>);

I am currently trying to fix the height and width of the image, but I found it to be buggy, with the image width fixed at 3.04cm.

The API to insert image and setting it's height and width:

setImageValue(<tag>, array('path'=><path to file>,'height'=><height>,'width'=><width>);

Source