Adding images, logos, and signatures in WooCommerce documents holds significant importance for enhancing brand identity and providing a professional and personalized customer experience. WebToffee’s WooCommerce PDF Invoices, Packing Slips, and Credit Notes plugin and WooCommerce Shipping Labels, Dispatch Labels, and Delivery Notes plugin provide the provision to have product images, company logos, and signatures within the documents. However, there may be instances where the product images or logos may be missing from the PDF documents. To solve this issue:
- Use WebToffee’s free mPDF add-on.
- Add the custom code snippet provided.
Image/Logo Missing issues can occur due to problems with the image size, the absence of an image processing library, permission issues, etc.
The following image shows a WooCommerce invoice PDF document with an image and logo missing issue.
Before moving on to the solutions make sure that the image/logo missing issue isn’t due to the following reasons:
- Absence of image processing library.
- An issue with the image size.
- Permission issues.
- Server request restrictions.
Absence of image processing library
When the WordPress site lacks image processing libraries or when the libraries are not compatible with the uploaded image format then the image/logo missing issues can occur. To solve this ensure that proper image processing libraries are present and also ensure to upload images that are compatible with the library.
An issue with the image size
When the uploaded image size exceeds the server capacity these kinds of errors can occur. So upload images of sizes that are compatible with the server capacity.
Permission issues
Lack of file permission can prevent WordPress from reading files on the hosting server. So to solve this grant access for reading and uploading images.
Server request restrictions
If the images are hosted on an external server, there’s a possibility that the server might be blocking external server requests. To address this get in touch with the server team and discuss potential solutions for unblocking these requests.
If the image/logo missing issue still persists then move on to the solutions below:
1. Using the mPDF add-on
The image/logo missing issue in WooCommerce PDF documents can be solved using WebToffee’s free mPDF add-on. To solve this issue switch the builtin Dompdf library with the Mpdf library. To fix the image/logo missing issue:
- Install and Activate WebToffee’s mPDF add-on.
- Navigate to Invoice/Packing > General Settings> Advanced.
- Under the Advanced tab, navigate to the PDF library as shown below.
- Select Mpdf as the PDF library as shown below.
- Click on update settings and save changes.
The image below displays a WooCommerce invoice PDF document with the image and logo missing issues resolved.
2. Using a custom code snippet
An alternative solution to solve the image/logo missing issue is to use a custom code snippet.
Add the custom code snippet given below to the WordPress site. Add the custom code snippet directly into the active child theme’s functions.php file or use a third-party plugin. Refer to this article for more details on how to add a custom code snippet using a third-party plugin.
The custom code snippet is given below:
- Was this article helpful?
- Yes, thanks!Not really
Comments (4)
Md Sabir
September 3, 2023
The images get corrupted/missing during email and download invoice. However, it works fine if i select print.
Also note, that recently, i setup cloudflare.
Hema
September 7, 2023
Hello Md Sabir,
Thanks for reaching out. We need more data to find the root cause. Kindly contact us via customer support to get the issue resolved.
Jo
April 20, 2022
After downloading the plugin and changing the settings, it is still not working
Mike
April 21, 2022
Hi,
Since the issue is site specific kindly contact our support via this link to rectify it. Thanks for understanding.