Mautic Community Forums

Avatar png

Your software
CentOS 8.2
Safari / Firefox latest builds
mautic 3.1.1 from github
php 7.3.22

Your problem
The avatar image is again not showing up. If a gravatar can not be found, will the avatar.png be used from the assets folder? Apache has access to the assets folder. Since this broken image is showing up all over mautic, it doesn’t look good, I’m wondering again how to fix this?

Steps I have tried to fix the problem:

chown -R apache:apache /var/www/*
chown -R apache:apache /var/www/mautic/*

chmod 0777 /images/avatar.png

Still it looks like this:

2 Likes

any ideas how i can fix this avatar bug?

the command ps aux | grep apache2 returns:

root 72982 0.0 0.1 11776 992 pts/1 S+ 13:43 0:00 grep --color=auto apache2

the steps like described didn’t bring any changes:

find . -type f -not -perm 644 -exec chmod 644 {} +
find . -type d -not -perm 644 -exec chmod 755 {} +
chmod -R g+w var/cache/ var/logs/ app/config/
chmod -R g+w media/files/ media/images/ translations/
rm -rf var/cache/*

i also ran the command:

``sudo chown -R apache:apache /var/www/mautic/*

still, the avatar.png is not used, neither for the user nor the contacts. what else can i do?

Maybe the image is corrupted somehow. Have you deleted it and replaced with another file ?

Have you opened dev tools on your browser and inspected that element specifically to see if that sheds any light?

good point. The link seems to be broken to the standard avatar.png

<span class="img-wrapper img-rounded" style="width:32px;"><img src="https://www.gravatar.com/avatar/5c47a76f4ce1d1694c0d17693b74ef5a?s=250&d=https%3A%2F%2Fmautic.mydomain.tld%2Fmedia%2Fimages%2Favatar.png

when i click on it in the sourcecode link i get redirected to:

view-source:https://i2.wp.com/mautic.mydomain.tld/media/images/avatar.png?ssl=1

with the error message:

Sorry, the parameters you provided were not valid

Cutting away the “i2.wp.com” shows me the avatar. so where is this “i2.wp.com” coming from?

Avatar:

The “avatar” being displayed is a Gravatar placeholder. If there is a Gravatar associated with the email address of a contact it displays by default. You can select what you want displayed by clicking edit on the contact.

There may be a way to change that in the code but it would take some exploring.

in the case of a contact you can choose or set another image. in the case of the owner / user there is no way to change this. i dont have a gravatar acc. for the user.

i also used my gmail address for one test account and it stills shows the broken missing asset image in the contact.

it’s just weird, that the standard avatar is not showing up, instead a broken / missing asset is used in the code.

maybe i will drop the database and start from scratch.

are you running any ad blockers or similar extensions in the browser you are using? Maybe the resource is getting blocked by an extension.

add info@monkeybeetees.com as a contact and see if their gravatar pops up

last idea is to check permissions on your media folder

The monkeybeetees gravatar is showing up (great one btw).

The strange thing is, the mautic avatar is showing up, when i click in mautic on create new user. As soon as is fill in a non existing email address and click save the standard mautic avatar gone and no placeholder is used anymore.

Creating the contact: (AVATAR SHOWING UP)

Saving the contact without any email address AVATAR STILL VISIBLE

Filling in an email address (AVATAR IS GONE AND NO PLACEHOLDER INSTEAD)

ohh, I think it’s a firewall thing, port 80/443 needs to be open. It was restricted before to only my IP. Thanks for your time and input EJL :slight_smile:

So the ip from wp.com 192.0.78.24 must have access to port 80/443 and all is good.

Can this become a legal / GDPR issue? Since all email addresses are sent to wp.com to check for an gravatar, the personal data is sent to US servers. Allthough you might think, all data is processed on your own server it’s not true in this case.

Wouldn’t it be better to make this gravatar thing optional? Otherwise the avatar from the mautic asset folder is used.

Excellent job catching the firewall issue. I wasn’t expecting that.

I completely agree. It seems mundane and probably covered under someone’s terms and conditions that makes the queries to WP.com permissible but it seems to make more sense all the way around to default to a local image and the gravatar as optional.

@frankofno check out
app/bundles/CoreBundle/Templating/Helper/GravatarHelper.php
app/bundles/LeadBundle/Templating/Helper/AvatarHelper.php

Fwiw: I also had a problem with the avatar picture not being loaded somehow, as it was pointing to https://i0.wp.com/my.mauticinstall.tld/index.php/media/images/avatar.png?ssl=1 and the ports 80 & 443 were open to IP of wp.com. When removing the “index.php” from the URL, the avatar was loading.

So thanks to the help in this post I figured out that in the /app/config/local.php file my site_url was https://my.mauticinstall.tld/index.php after removing the index.php it worked. Hope this may help future someone :slight_smile:

1 Like