Support » Plugin: wp-mpdf » Images increase load time too much

  • Resolved pinksharpii


    I’m setting up a PDF download for a client’s site to integrate into their woocommerce products. If I add the following code to add the product thumbnail, it takes SO MUCH longer to generate. (like excess of 30 seconds, instead of 2 seconds without the image)

    	$pdf_output .= get_the_post_thumbnail( $post, 'woocommerce_thumbnail', '' );

    And this is using the small 300×300 woocommerce image thumbnail size.

    Is this a known issue? How can we improve this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author fkrauthan


    The plugin in that case will download the image and then embed it into the PDF. This is done by the MPDF lib. So you might wanna reach out to them to see if there is anything that could be optimized. Adding 28secs just because of one image seems a bit crazy and looks like some really low memory limits or something like that on your server.

    I know from other people that embed quiet a lot images without a notable increase in PDF generation time.

    I don’t believe it’s a server issue. We’re running at 512m for memory and it’s on PHP 7 and it’s still taking a full minute to generate a PDF with a single 300×300 image. And only 2sec without an image at all.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Images increase load time too much’ is closed to new replies.