# Avatar URL is HTTP instead of HTTPS

**URL:** https://meta.discourse.org/t/avatar-url-is-http-instead-of-https/92115
**Category:** WordPress
**Created:** [July 11, 2018, 6:19pm UTC](https://meta.discourse.org/t/avatar-url-is-http-instead-of-https/92115 "2018-07-11T18:19:31Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Olivier\_Lambert](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/olivier_lambert/32/74807_2.png) [@Olivier\_Lambert](https://meta.discourse.org/u/Olivier_Lambert)
#### Post date: [July 11, 2018, 6:19pm UTC](https://meta.discourse.org/t/avatar-url-is-http-instead-of-https/92115/1 "2018-07-11T18:19:31Z")

</div>

Quick question!

I use your plugin on this website: [LE secret d’un storytelling qui cartonne et 3 modèles d’histoire à adapter à votre activité](https://www.latranchee.com/le-secret-dun-storytelling-qui-cartonne-et-3-modeles-dhistoire-a-adapter-a-votre-activite/)

On this link, we can see that I have insecure content on the page because the avatar images are loaded via HTTP.

I think the easiest way to fix this would be to edit the {avatar\_url} tag. How should I proceed?

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 11, 2018, 6:32pm UTC](https://meta.discourse.org/t/avatar-url-is-http-instead-of-https/92115/2 "2018-07-11T18:32:35Z")

</div>

> [@Customize the structure of WP Discourse templates](https://meta.discourse.org/t/customize-the-structure-of-wp-discourse-templates/50754/15):
>
> On this link, we can see that I’ve got insecure content on the page because the avatar images are loaded in http.

Is the ‘force https’ setting enabled on your Discourse forum? If it is, Discourse should be returning an avatar\_template with an `https` URL. The URL provided by the Discourse avatar template is used by the WordPress plugin to create the link.

---

<div class="post-metadata">

### Author: ![Olivier\_Lambert](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/olivier_lambert/32/74807_2.png) [@Olivier\_Lambert](https://meta.discourse.org/u/Olivier_Lambert)
#### Post date: [July 11, 2018, 6:47pm UTC](https://meta.discourse.org/t/avatar-url-is-http-instead-of-https/92115/3 "2018-07-11T18:47:37Z")

</div>

I had to deactivate the force https on my discourse install because it caused a problem (infinite redirect) with another app I’m using for the SSO login 😕

---

<div class="post-metadata">

### Author: ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)
#### Post date: [July 11, 2018, 6:52pm UTC](https://meta.discourse.org/t/avatar-url-is-http-instead-of-https/92115/4 "2018-07-11T18:52:42Z")

</div>

If you can fix that, the avatar links will start using HTTPS. The links will not be updated until new comment data is fetched from Discourse though.

I don’t think that customizing the `comment_html` template will work for solving this problem. I will add a filter to the [WP Discourse](https://github.com/discourse/wp-discourse) function that is used for setting the avatar\_url. If you are unable to get ‘force https’ working on your forum, you will be able to hook into this filter to rewrite the avatar URLs. I’ll let you know when it’s been added.

---

<div class="post-metadata">

### Author: ![Olivier\_Lambert](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/olivier_lambert/32/74807_2.png) [@Olivier\_Lambert](https://meta.discourse.org/u/Olivier_Lambert)
#### Post date: [July 11, 2018, 7:40pm UTC](https://meta.discourse.org/t/avatar-url-is-http-instead-of-https/92115/6 "2018-07-11T19:40:13Z")

</div>

Until then, I’ve switched the avatar tag for this value

```plaintext
https://forum.latranchee.com/user_avatar/forum.latranchee.com/{username}/50/7670_1.png

```

Problem solved ✅

Thank you for your prompt response.
