TCPDF ERROR: [Image] Unable to get the size of the image: https://www.xxxxx~.gif

Started by GJC Web Design, May 31, 2020, 13:40:37 PM

Previous topic - Next topic

GJC Web Design

Just posting this here as it may help someone.

Client reported the standard "no emails on orders" and found that the PDF invoice was failing with TCPDF ERROR: [Image] Unable to get the size of the image: https://www.xxxx.com/images/virtuemart/shipping/sefl.gif
Image and path all correct and it really was a gif ( not the png problem )

found in libraries\vendor\tecnickcom\tcpdf\tcpdf.php ~ line 6823 ( of a 24,500 line file!!!  no wonder no one is interested in this pdf shite ) in the function Image()
that the vendor image passed correctly but the ship/payment images failed ..
the error Unable to get the size of the image is btw very generic .. just means something failed in the image processing.

The vendor file was  images/stories/virtuemart/vendor/xxxx-Logo.gif

the ship/pay file was https://www.xxxx.com/images/virtuemart/shipping/sefl.gif

i.e. fully qualified url - why this should start to fail I don't know ...it has always been like this in VM afaik - client swears nothing changed on the server
The images are accessible by direct url.
Site is VM3.8 and TCPDF1.08

but removing the host by

   
/** GJC remove the host */   
        $uri = JUri::getInstance();
        $file = str_replace($uri->getScheme().'://'.$uri->getHost().'/','',$file);
    /** GJC remove the host */


and everything started working again
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

nistune

We have just seen this exact issue since the weekend. Order emails stopped coming in, and then manually confirming them showed the TCPDF error

No idea what changed... added some images into the Joomla media folder last week, and a few article modifications

Where did you add this line? Immediately inside Image() function?

I'm getting various errors similar to yours with my payment and postage methods, even though they have worked for the last five years(!)
TCPDF ERROR: [Image] Unable to get the size of the image: https://nistune.com/images/virtuemart/payment/btn_paywith_primary_m.png

Joomla! 3.9.18
VirtueMart 3.6.10 10211

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

note my post above states this is not a png problem .. b4 altering the tcp file try with a gif first ..

if it still fails then try removing the host with the above .. and yes .. it is added as the first line of the function
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

GJC Web Design

yes .. I saw that he is using a png .. just reinforcing that my fix had nothing to do with the known png problem .. the error was thrown on all image types
GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

Jörgen

Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

Zegenrijk

Same problem here. Suddenly more than one site reports this problem, just a few days ago it works and now a few days later the described problem (nothing changed, no updates). The work around is a quick solution, but looking for the cause and real solution.

Regards Michel

Zegenrijk

Quick thought -> maybe not relevant, but when nothing changes and multiple sites have suddenly problems without knowing each other, could this maybe the problem -> happens on 30 may: https://www.agwa.name/blog/post/fixing_the_addtrust_root_expiration

nistune

QuoteTCPDF if AFAIK NOT PNG compatible.
Yeah I found that out when searching this forum for the error message. However two things:
1. My PNG files (including this one) always worked previously for all orders (over the last five years) when they came in (prior to the weekend)
2. When I changed my PNG files to JPG/GIF, I still got the same error message with those files

Anyway the fix by GJC Web Design does work on new orders (since the fix) coming in now

Just updating the existing orders (marking as confirmed, shipped state) that is when I could repeat the message on the orders with the broken image links. There is a new problem and maybe that root key might be a cause?





GJC Web Design

QuoteJust updating the existing orders (marking as confirmed, shipped state) that is when I could repeat the message on the orders with the broken image links.

The path /html to the image is stored in the DB under the ship method but the "fix" still should remove the host... strange



GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation

nistune

Even with the fix added, I got this error today when updating the order Confirmed state. This one is a GIF file, similar to the OP
TCPDF ERROR: [Image] Unable to get the size of the image: https://nistune.com/images/virtuemart/shipment/australia-express-courier-international.gif

I upgraded Joomla to Joomla! 3.9.19 which did not change my modified tcpdf.php file