Invalid image: zip:///tmp/......../iamge4.png
Author: Loai-HassanCreated Mar 17, 2024Updated Sep 9, 2026
LabelsBug ReportOpen XML (Word 2007+)Status: Waiting for feedback
Describe the Bug
when i laod docx files it shows Invalid image: zip:///tmp/......../iamge4.png which is very weird and when i followed the code it leads to the library adding and image and triggering the error
and it happens with 90% of files
Specially the ones i made
some samples online work
but when i make a file it shows that error
Steps to Reproduce
<?php
require __DIR__ . '/vendor/autoload.php';
$phpWord = PhpWordIOFactory::load($filePath);
Expected Behavior
the file should be loaded
Current Behavior
Invalid image: zip:///tmp/......../iamge4.png
Context
Please fill in your environment information:
- PHP Version: 8.1 / laravel
- PHPWord Version: 1.1
Source: PHPOffice/PHPWord