Images not showing gmail

Your software
My Mautic version is: 5
My PHP version is: 8.1
My Database type and version is:

Your problem
My problem is:

When I send test email, images doesn’t show up in Gmail but show up in Hotmail and in

Does the email land in your inbox?
Maybe you have to enable downloading images, don’t you see a yellow bar in gmail ‘enable downloading images’ or similar?
Do you use SSL in your Mautic, is it https?

Yes, I tried to send an email to a, and
They all receive the message but on gmail the images doesn’t show up.

It does show up on outlook and to any email of mystic as well.
And yes, https is enabled.

Please check you browser console (“Dev Tools”). This will show the error for the images not loading.

It shows 404 errors for each image:


The image URL is like:

the last part of a image url is like which show the actual image when open in a new tab.

Another thing I notice is that the mautic logo is displayed but my avatar is not (I haven’t set one yet as I don’t know how to change it but I guess there should be a default one)

This seems to indicate, that Google is not able to load your image - while you can load it locally. Do you block Google on your server maybe? Not sure if thats relevant for secure loading of mail assets.

This resource is loading locally via your browser. So differently to the Google Proxy loading of your images. Is your local browser blocking certain resources? Do you use anti tracking plugins?

This could be related with a DNS misconfiguration where it loads fine on your network but remote can’t.

This does happen when using a dedicated DNS zone for a subdomain but not declaring it in the SLD zone.

Check your DNS propagation using a third party tool like

If your subdomain isn’t green all over the board, you have a DNS issue and check what I just said (missing nameservers for your subdomain zone).

I fixed it after changing the Nginx Configuration file.
Now images display correctly in Gmail.
Also even the avatar in the dashboard is displayed correctly (didn’t mention it but was missing as well).

1 Like

What did you change in the Nginx configuration?

I think I’m having the same problem.

This is my new Nginx config.
Note, the last part are generated by Cerbot for HTTPS support.

server {

   root /var/www/mautic/docroot;

   error_log /var/log/nginx/mautic.error;
   access_log /var/log/nginx/mautic.access;
   client_max_body_size 20M;

   index index.php index.html index.htm index.nginx-debian.html;

   location / {
     # try to serve file directly, fallback to app.php                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
     try_files $uri /index.php$is_args$args;

   location ~ /(mtc.js|1.js|mtracking.gif|.*\.gif|mtc) {
       # default_type "application/javascript";                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    
       try_files $uri /index.php$is_args$args;

   # redirect some entire folders                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
     rewrite ^/(vendor|translations|build)/.* /index.php break;

   location ~ \.php$ {
     include snippets/fastcgi-php.conf;
     fastcgi_pass unix:/run/php/php8.1-fpm.sock;
     #Note: If you install Mautic on iRedMail server, you should use the TCP socket instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

   location ~* ^/index.php {
     # try_files $uri =404;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
     fastcgi_split_path_info ^(.+\.php)(/.+)$;
     # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

     fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;
     #Note: If you install Mautic on iRedMail server, you should use the TCP socket instead.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
     fastcgi_index index.php;
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
     include fastcgi_params;

     fastcgi_buffer_size 128k;
     fastcgi_buffers 256 16k;
     fastcgi_busy_buffers_size 256k;
     fastcgi_temp_file_write_size 256k;

    # Deny everything else in /app folder except Assets folder in bundles                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
    location ~ /app/bundles/.*/Assets/ {
        allow all;
        access_log off;
    location ~ /app/ { deny all; }

    # Deny everything else in /addons or /plugins folder except Assets folder in bundles                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    location ~ /(addons|plugins)/.*/Assets/ {
        allow all;
        access_log off;
    # location ~ /(addons|plugins)/ { deny all; }                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  

    # Deny all php files in themes folder                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
      location ~* ^/themes/(.*)\.php {
        deny all;

    # Don't log favicon                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            
    location = /favicon.ico {
        log_not_found off;
        access_log off;

    # Don't log robots                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
    location = /robots.txt  {
        access_log off;
        log_not_found off;

    # Deny yml, twig, markdown, init file access                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    location ~* /(.*)\.(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ {
        deny all;
        access_log off;
        log_not_found off;

     # Allow access to certbot directory in order to obtain TLS certificate                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        
     location ~ /.well-known/acme-challenge {
        allow all;
    # Deny all attempts to access hidden files/folders such as .htaccess, .htpasswd, .DS_Store (Mac), etc...                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
    location ~ /\. {
        deny all;
        access_log off;
        log_not_found off;

    # Deny all grunt, composer files                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               
    location ~* (Gruntfile|package|composer)\.(js|json)$ {
        deny all;
        access_log off;
        log_not_found off;

    # Deny access to any files with a .php extension in the uploads directory                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
        location ~* /(?:uploads|files)/.*\.php$ {
                deny all;

     # A long browser cache lifetime can speed up repeat visits to your page                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       
  location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
       access_log        off;
       log_not_found     off;
       expires           360d;


    listen [::]:443 ssl ipv6only=on; # managed by Certbot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
    listen 443 ssl; # managed by Certbot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    ssl_certificate /etc/letsencrypt/live/; # managed by Certbot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
    ssl_certificate_key /etc/letsencrypt/live/; # managed by Certbot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

}server {
    if ($host = {
        return 301 https://$host$request_uri;
    } # managed by Certbot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         

   listen 80;
   listen [::]:80;
    return 404; # managed by Certbot                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

1 Like

Thank you! I can compare this to what I use.

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.