Forum


Replies: 5   Views: 566
Replaceplaceholderimage does not add the image
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by admin  · 16-04-2023 - 11:08

Hello,

The replacePlaceholderImage method replaces an existing image that includes a template placeholder in the alt text with a new image. On the API doc page (https://www.phpdocx.com/api-documentation/templates/replace-placeholder-image-Word-document) you can read this same information.

If you want to replace a text placeholder by an image (or a chart, a table, a list, complex contents or others) you need to use replaceVariableByWordFragment. We recommend you check the included samples of this method and also the following documentation pages:

Regards.