Forum


Replies: 7   Views: 3583
Issue with <img> in html
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  · 22-02-2018 - 12:20

Hello,

When a stream is added as src of an image, the embedHTML method uses exif_imagetype from PHP to get the mime type. Maybe the server is not returning the correct mime type of the image or for any other reason PHP can't get it correctly or the file_get_contents method is unable to download the stream content from the remote URL due to some permission access.

If you want to debug it, the image is downloaded and added in the HTML2WorML.inc file (line around 981).

The dev team has done some quick tests and everything is running fine (using the test servers and samples). If you send the DOCX output generated by your server to contact[at]phpdocx.com, they'll check it.

If you also send the most simple script (a single HTML with two existing remote imgs: a static image and a stream) that illustrate your issue they'll check it; they need to run it, so please send the most simple script that doesn't do external connections such as databases or web services.

Regards.