Phpword template cannot modify picture

I need to change the values of the template to text and pictures ~

clipboard.png

as a result, it is found that the document does not seem to be written to replace the picture

and not even the addImage method

checked the data and found no practical effect

could you tell me how to do it, please? thank you

the code is as follows

    $phpWord=new \PhpOffice\PhpWord\PhpWord();
    $section = $phpWord->loadTemplate("./word.docx");
    $section->setValue("name","");
    $section->setValue("img","./Uploads/reportImg/15450398261.png");
    $section->saveAs("./Uploads/doc/word.docx");`
Feb.23,2022

problem solved. I just saw an article that is how to add and modify template images
https://www.phpsong.com/3015.

.

it clearly explains how to deal with template replacement images

Menu