Forum


Replies: 7   Views: 3390
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 meantimeit  · 19-02-2018 - 10:00

I have two test <img> tags in a HTML fragment - the first image is a direct link via a HTTP request, the second is to the same image but accessed via a PHP script that echoes out the file_get_contents().

I can access both the above images using the appropriate URLs so they are working individually but the generated DOCX only shows the directly linked image, the image via PHP is not shown at all, not even a broken image.

The first URL is in the form http://our-test-site/images/logo.jpg
The second is in the form http://our-test-site/images/test.php

If I change the second URL to http://our-test-site/images/test.php?image.jpg then the generated DOCX shows a broken image placeholder instead of nothing.

Any ideas? Do I need to send specific headers? Does the <img> tag need anything special? Is there a bug in the phpdocx software? Is there anything else I need to provide to help with a diagnosis?

Thanks,
D.