PHPWord icon indicating copy to clipboard operation
PHPWord copied to clipboard

setImageValue resulting in nothing/empty string

Open propertyhive opened this issue 2 years ago • 0 comments

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

propertyhive avatar May 10 '22 11:05 propertyhive