PHPWord
PHPWord copied to clipboard
setImageValue resulting in nothing/empty string
Describe the Bug
setImageValue results in empty string / no replacement.
Steps to Reproduce
Using a tag in a template ${property_image_1}
and replacing it like so:
$templateProcessor->setImageValue(
'property_image_1',
[
'path' => '/path/to/file.jpg'
]
);
... results in nothing being output. No errors, nothing in the logs etc. I've also tried specifying the size too but to no avail.
Expected Behavior
Image to be inserted into output document.
Current Behavior
No image / emptyness
Context
Please fill in your environment information:
- PHP Version: 7.4.26
- PHPWord Version: 0.18.3