# Mautic 5.1 avatar broken

**URL:** <https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378>\
**Category:** Product Support\
**Created:** [June 14, 2024, 12:36pm UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378 "2024-06-14T12:36:42Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![matbcvo](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/matbcvo/32/6285_2.png) [@matbcvo](https://forum.mautic.org/u/matbcvo)\
**Post date:** [June 14, 2024, 12:36pm UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378/1 "2024-06-14T12:36:43Z")

</div>

**Your software**  
My Mautic version is: 5.1.0  
My PHP version is: 8.1.29  
My Database type and version is: 10.3.39-MariaDB-0ubuntu0.20.04.2

**Your problem**  
My problem is: Avatar is broken

Upgraded to Mautic 5.1 via CLI (mautic update find & apply)

![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/72efe3c35475703b6f5633f7bf99219bdea8cea6.png)

These errors are showing in the log:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/3386f1533bda8564c4833006670e077554f0bb32.png)

[https://www.gravatar.com/avatar/9e15e9e4a86fb32bb0e0cc0b6d3c8734?s=250&d=https%3A%2F%2F\*\*\*.\*\*\*.\*\*\*%2Fapp%2Fassets%2Fimages%2Favatar.svg%3Fvcc04a1bf](https://www.gravatar.com/avatar/9e15e9e4a86fb32bb0e0cc0b6d3c8734?s=250&d=https%3A%2F%2F ***.***.***%2Fapp%2Fassets%2Fimages%2Favatar.svg%3Fvcc04a1bf)

returns “Error 0004. Unable to load the image.”

Steps I have tried to fix the problem:  
I have tried clearing cache bin/console cache:clear  
also bin/console m:a:g

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [June 15, 2024, 10:56am UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378/2 "2024-06-15T10:56:01Z")

</div>

Thanks - there is a bug for this: [Missing Image in e-mail details, contacts · Issue #13833 · mautic/mautic · GitHub](https://github.com/mautic/mautic/issues/13833)  
You may join there and add missing details, if there are any.

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [June 15, 2024, 4:42pm UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378/3 "2024-06-15T16:42:05Z")

</div>

I think I resolved this by adjusting the config of web server

---

<div class="post-metadata">

**Author:** ![dirk\_s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dirk_s/32/748_2.png) [@dirk\_s](https://forum.mautic.org/u/dirk_s)\
**Post date:** [June 15, 2024, 8:19pm UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378/4 "2024-06-15T20:19:38Z")

</div>

@mzagmajster please tell us what you changed, so others may also have a look?

---

<div class="post-metadata">

**Author:** ![okagoogle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/okagoogle/32/12661_2.png) [@okagoogle](https://forum.mautic.org/u/okagoogle)\
**Post date:** [June 16, 2024, 2:33am UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378/5 "2024-06-16T02:33:31Z")

</div>

@mzagmajster yeh please share the details

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [June 16, 2024, 7:20am UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378/6 "2024-06-16T07:20:09Z")

</div>

This depends on what webserver you are using. In general you have to tell the web server to search for the images in the right folder.

In case of nginx it was something like:

```auto
    location ~ /app/assets/ {
       allow all;
    }

```

If you put this in the right order in configuration, avatars should start loading.

---

<div class="post-metadata">

**Author:** ![okagoogle](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/okagoogle/32/12661_2.png) [@okagoogle](https://forum.mautic.org/u/okagoogle)\
**Post date:** [June 16, 2024, 2:22pm UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378/7 "2024-06-16T14:22:09Z")

</div>

> [@mzagmajster](#):
>
> If you put this in the right order in configuration, avatars should start loading.

I am also using Nginx. Can you tell me the right place to put this code in the configuration file?

---

<div class="post-metadata">

**Author:** ![mzagmajster](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/mzagmajster/32/687_2.png) [@mzagmajster](https://forum.mautic.org/u/mzagmajster)\
**Post date:** [June 16, 2024, 2:25pm UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378/8 "2024-06-16T14:25:10Z")

</div>

Not sure, how exactly open up configuration for your mautic, usually a file in `/etc/nginx/sites-enabled` and put the location block among the other ones that you have.

Reload the nginx and see if its working.

---

<div class="post-metadata">

**Author:** ![peterhai](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/peterhai/32/5803_2.png) [@peterhai](https://forum.mautic.org/u/peterhai)\
**Post date:** [December 4, 2024, 8:15am UTC](https://forum.mautic.org/t/mautic-5-1-avatar-broken/32378/9 "2024-12-04T08:15:48Z")

</div>

I did it and it worked.  
File nginx on /etc/nginx/conf.d
