Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

vincent15000's avatar

How to apply CSS styles and show images in an html email for Gmail ?

Hello,

I just created a mailable and its blade view.

Sent to Gmail and some other mail clients, the styles are deactivated.

Same thing with base64 encoded images that are not displayed.

How is it possible to apply CSS styles that can be applyed and displayed in Gmail ?

How is it possible to show images in an html mail received on Gmail ?

Thanks for your help.

V

0 likes
12 replies
Shivamyadav's avatar

could you please show me your email blade code?

I have not used the image but my tailwind styles persist after the mail send to user. I have only 1 mail tried with the mailable class and blade view to did not created any layouts for this.

Glukinho's avatar

How your styles are included? It is advised to use only inline style="font-family: Arial; ..." attributes in emails; no classes, no <style> tags, no external CSS files. The goal is maximum compatibility with all possible mail clients.

1 like
Snapey's avatar

Mail clients only support a very limited subset of css. Forget flexbox and grid. Forget colours using css variables. Layout with tables and use inline css at the start of the email.

1 like

Please or to participate in this conversation.