Resolve image missing/corrupted issue in WooCommerce PDF documents
PDF Invoice, Packing Slip, Delivery Note, and Shipping Label for WooCommerce plugin allows you to have product image, company logo, or signature within the documents. Typically, the images will be rendered without any hindrance in your documents.
However, there may be instances where the images may appear corrupted or distorted within the PDF format of the WooCommerce documents.
Following are some of the reasons for the issue and its possible workarounds:
- Image processing library not present: It is likely that the image processing libraries (e.g: Imagick, gd) are missing. It may also occur if the image processing library present on your site is compatible with only a specific image format or the uploaded image is already in a corrupted format that the library is not able to process it. So, ensure that the library corresponding to your image format is present and to upload proper images only.
Workaround: Please cross-check that all the image processing libraries are present on your site.
- Image size: The uploaded image size may exceed the server capacity.
Workaround: Upload images of sizes that are compatible with the server capacity.
- Server request block: If the images are hosted on an external server, it is likely that your server may block external server requests.
Workaround: Contact your server team and find an optimum solution for unblocking requests.
- Permission issue: Wrong file permissions prevent WordPress from reading files on the hosting server.
Workaround: Grant access for reading or uploading images.
Another proven workaround that we provide for the image missing issue is to insert the below given code snippet into the functions.php of active theme file.
If your issue still persists, we advise you to reach out to our technical support team to get it resolved.