qr-code-bundle icon indicating copy to clipboard operation
qr-code-bundle copied to clipboard

QR Code not displaying in Gmail

Open caerroff opened this issue 4 months ago • 0 comments

Hi Everyone,

I am not sure whether this issue is related to the library or if this is a Gmail issue.

I have a Twig template where I generate a QR Code. This is working great in a browser when rendering this template

<img src="{{qr_code_data_uri(ticket.token)}}" width="{{200}}" height="200" />

I renderView this template, and send it as an email.

$this->mailService->sendEmail(
                $ticket->getEmail(),
                "Object here",
                $this->renderView("mail/bookingConfirm.html.twig", [
                    "ticket" => $ticket,
                ])
            );

FYI, I made this mailService myself and it is using PHPMailer. It is rendering the HTML correctly, including the QR Code on Proton, but not on Gmail.

When I inspect the email, i am left without any SRC.

<img width="200" height="200">

But on other mail client (Proton), everything is working as expected. I even transferred the email from Gmail to Proton, and I am seeing the QR Code on Proton.

Any idea where this could be coming from ? Sorry in advance if this is not related to this library enough

caerroff avatar Aug 28 '25 09:08 caerroff