Yes, if the images are PNG, you need to install the php-gd extension, because mPDF needs it to render alpha maps (transparencies of the images).
The issue can be debugged by setting up a debug flag/option for your script, and adding code like
if ($debug) {
$mpdf->debug = true;
$mpdf->showImageErrors = true;
}
then you'll be able to see the actual error that caused the missing images
which is
mPDF error: IMAGE Error (https://url.to.server/image.png): GD library required for PNG image (alpha channel)
(actually, there will be square icons with an X, like in old InternetExplorer "missing image" style).
You can add GD extension to composer.json, see this answer