Forum


Replies: 2   Views: 1508
Addimage base64
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 maint  · 21-04-2021 - 09:55

Hi,

I cannot seem to add an image using the addImage method with the image data being in base64. Is there a way to do this? Seems as if it should be supported as it is when using image tags.

Using phpdocx 11 advance.

Thanks!

Posted by admin  · 21-04-2021 - 10:54

Hello,

UPDATE: phpdocx 12 has added support to add base64 images in addImage and replacePlaceholderImage methods.

addImage supports adding images from files and streams, but not as base64. Image as base64 is only supported using embedHTML (or replaceVariableByHTML).

We have opened a task to add support in a future release of phpdocx.

Regards.

Posted by admin  · 28-05-2021 - 06:32

UPDATE: phpdocx 12 has added support to add base64 images in addImage and replacePlaceholderImage methods.