How can I disable or remove gravatar?

AI-generated summary

The discussion revolves around disabling or removing Gravatars on a Discourse installation. Tyler_Oakson initially wanted to disable Gravatars, but found that even after turning off “automatically download gravatars” in site settings, users could still set a Gravatar. zogstrip suggested that Gravatar cannot be fully disabled, but can be hidden via CSS.

Tyler_Oakson asked for the CSS value to hide Gravatars, and Mittineague suggested using browser dev tools to find it. However, Tyler_Oakson couldn’t find the div id for the Gravatar button after setting custom pictures to false.

The conversation revealed that Tyler_Oakson wants to use a custom system avatar solution, which fetches avatars from a third-party API based on usernames. featheredtoast and riking understood the use case, where Gravatars would conflict with the custom avatar solution.

I’m running discourse (bitnami install) and was wondering how I can disable gravatars? Or which line of code to remove to prevent gravatars from popping up, trying to keep it at system default only.

Search for automatically download gravatars in site settings.

Thats turned off, however it still lets people set a gravatar.

Been a couple of hours so I’m initiating an emergency bump.

Disabling gravatar is not available. You could potentially hide it via CSS, but that will only “disable” it in the UI. If you want to disable in the code too, you’ll have to write a plugin.

Which is the css value? I’m not sure where to get it :confused:

Try your browser dev tools, IMHO a good tool to have !

For example, this

div.avatar-selector div div div:nth-of-type(2n) { background-color: #0ff; }

does this

I set custom pictures to false, so if I click the change avatar button on preferences it automatically goes to gravatar without a popup, so I can’t get the div id for the button, due to its generic button.

Wait, so what are the avatars that people have? If custom avatars are disallowed and gravatar is disallowed, what are the avatars?

I guess he just wants all users for his installation to have the A-Z default system profiles, so it’s kinda like running in a ‘no avatars’ mode?

Dunno what the impulse is though; I’m quite fond of avatars in any community site myself.

I edited the A-Z avatars to use an API that gets avatars from another game based on username, however If they use gravatar it would ruin the entire purpose

Ah, so you replaced the “system avatar” functionality with a Minecraft avatar service using external_system_avatars_url, right?, and would like to force everyone onto that. I think that might be a valid usecase.

Its not minecraft, but yes it used a 3rd party API to get in-game player images