by Davo Smith.
I'm not sure why you have chosen to use mpdf, instead of TCPDF (which is already available in Moodle core, via lib/pdflib.php). It is almost certainly the case that the mpdf library cannot access the files in question via the URL, as the CURL call to download the image will not come from a logged in user (but from the server itself).
I've already suggested a workaround, which certainly works when TCPDF, but I have no idea if it works in the mpdf library that you have chosen to use instead.