Home > front end >  Images not displaying in Gmail and other web based email apps
Images not displaying in Gmail and other web based email apps

Time:01-21

I am creating an email template in pug. All of my images show fine in the Outlook desktop app (after clicking to download them) But in Outlook web app and gmail. They dont show and just shows the alt text.

img.logo(src=hostname '/images/logo.png' alt="logo" style="display: block; height:64px; width:90px;" height="64" width="90")

hostname is the local address of the server 192.168.x.xxx

When trying to view in gmail web app I get a 404 for all images.

https://ci4.googleusercontent.com/proxy/MfZzjvwOhD2V2lA7VFFvjIY9Fe7OsBMxKm5r3zULK1xdqxQxnMv1klagBbX3LLWA41nRjLaxhucFNIdu7spbp8tQHpA=s0-d-e1-ft#http://192.168.1.238:4444/images/logo.png

CodePudding user response:

Both mail apps use a proxy server to load the images. But as your own webserver is currently not accessible from outside your own network, this request fails.

You need to host the images on a webserver that can be reached from the "usual internet"

  • Related