This article will show you the trick to set your Gravatar as your Favicon. So before moving further, have a look at article which show the method to generate Gravatar using PHP.
After following the linked article you should be able to generate your Gravatar using your email address.
We will use same technique to generate gravatar but in addition we will use this generated gravatar as Favicon for website.
Here we will create one function which generates the favicon from the gravatar for both website and apple touch icon.
This function takes two parameter first is your email address and second is the type of favicon you want. Second parameter can be either web or apple.
Let’s have a look at below code:
Once you have placed above function in your code then here is the way how you can use this.
Hope you have enjoyed this article. Also now if you want to make you favicon dynamic then just pass the random emails to this function and its done. :)
Subscribe to our RSS Feeds to Keep your self updated.
Avinash Zala is leading various projects which deals with the various technology involved with the web. A combination of perfect technical and management skills. Avinash would like to chat with you and convert your imagination into the working system. You can get in touch with him on Facebook and Twitter.
View all posts by: Avinash