Tech

How to use Gravatar and force HTTPS?

Chandan Kumar
By Chandan Kumar
December 6, 2017
1 min read
Share The Blog:
How to use Gravatar and force HTTPS

Today I am writing about a very simple short but unique and informative post at AvyaTech. And this is about how to use gravatar and force https. I think this post is also helpful for bloggers who run their blogs on WordPress and create their profile on Gravatar as well.

There are many websites and blogs that are all over https and using gravatar to display their profile image like so:

but the Problem is that gravatar is http, and how can we make this https? Let’s get the start and use the following script to use gravatar and force https.

  
add_filter('get_avatar_url', 'set_https', 10, 3);

function set_https($url, $id_or_email, $args){
return set_url_scheme( $url, 'https' );;
}
  

Put this code in your active theme functions.php

I hope you people find this post helpful and don’t forget to share your feedback and question below in the comment box.

Chandan Kumar

Chandan Kumar

Chandan Kumar doesn't just write code; he builds digital legacies. As the Founder and Team Lead at AvyaTech, Chandan combines high-level strategy with granular technical expertise to turn "what if" into "it's live." When he’s not steering his team through complex development sprints, he’s busy architecting the future of scalable, user-first technology.

Related Articles

Continue reading with these hand-picked articles on similar topics.

MCP Servers for Real Estate Companies
Tech
MCP Servers for Real Estate Companies
Your real estate data already knows where the money is. MCP lets you ask it. One of our clients runs a real estate marketplace in the US. Buyers and sellers find agents through the platform, and the marketplace earns a fee when a deal closes. Some agents were closing deals with marketplace leads and never […]
Chandan Kumar November 11, 2026
Dedicated Development Team Model in 2026: Is It Right for Your Project?
Tech
Dedicated Development Team Model in 2026: Is It Right for Your Project?
You’ve scoped your project, you have a budget, and now you’re looking at three engagement options: Fixed Price, Time and Materials, and Dedicated Team. The first two feel familiar. The third raises questions. What exactly do you get? Who manages the work? How does it compare on cost and control? This article breaks down the […]
Chandan Kumar July 30, 2026
WordPress Plugin Developers for Hire in 2026: A Complete Vetting Guide
WordPress
WordPress Plugin Developers for Hire in 2026: A Complete Vetting Guide
Hiring a WordPress plugin developer sounds simple enough — until you’re three weeks in, the plugin breaks on a routine core update, and the developer has stopped responding. It happens more than it should. This guide gives you a practical framework for finding, screening, and hiring WordPress plugin developers in 2026 — whether you need […]
Chandan Kumar July 9, 2026