Plugin

Developer
Supported

EE Gravatar

ExpressionEngine 1.x, ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From Philip Zaengle

     

You must be logged in to post.

Is it possible to not show an img tag at all if a user does not have a gravatar account?

General

Andrew Munro
Andrew Munro

Hi Phillip, thanks for the work you have done on this plugin. Just a quick question from me..

I’m wondering if somehow it is possible to not show any image if a user does not have a gravatar account? So instead of showing a default image it shows absolutely nothing at all, eg no img tag or anything.

If there some kind of if statement I can wrap it in?

Thanks

Philip
# 1
Developer
Philip

Unfortunately no, there’s no way to check and see if gravatar has an avatar for any particular email address. The plugin is simply turning the users email address into an md5 hash and appending it to the gravatar url, if gravatar has an image for the matching md5 it returns that image, otherwise it returns a default.