Skip to content
Advertisement

Laravel email shows images fine in Mailtrap but not visible in Gmail

I am using a simple Laravel Mailable below and have the header image displayed at the top of the email – this displays fine when going through Mailtrap.io but when the same email is sent to my Gmail account in the live environment it doesn’t display – what am I doing wrong?

JavaScript

Blade file

JavaScript

Advertisement

Answer

Its best to use the standard url based src for your image tag.

Just ensure you include the domain name in the url like this below.

JavaScript

Most modern email clients do not accept base64 images.

You can read more about it here

https://blog.mailtrap.io/embedding-images-in-html-email-have-the-rules-changed/

search the page and read about these two subjects

    1. Inline embedding, or base64 images in emails
    1. Linked images, or hosted pictures in HTML emails
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement