# Got mix-content error and confused

**URL:** <https://meta.discourse.org/t/got-mix-content-error-and-confused/66523>\
**Category:** WordPress\
**Created:** [20 Luglio 2017, 3:58pm UTC](https://meta.discourse.org/t/got-mix-content-error-and-confused/66523 "2017-07-20T15:58:16Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Vencent](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/vencent/32/120037_2.png) [@Vencent](https://meta.discourse.org/u/Vencent)\
**Post date:** [20 Luglio 2017, 3:58pm UTC](https://meta.discourse.org/t/got-mix-content-error-and-confused/66523/1 "2017-07-20T15:58:16Z")

</div>

After enabling WP-Discourse plugin, I found comments from Discourse caused my WP site mix-content problem: All the avatars were loaded through HTTP instead of HTTPS.

I tried to fix it myself. And after reading the WP-discourse plugin code, I found the HTTP image URLs are stored in wp\_postmeta with meta\_key `discourse_comments_raw`. And this value is got from [https://my.discourse.site/t/topic/20/wordpress.json](https://my.discourse.site/t/topic/20/wordpress.json)

I found this JSON file responded with HTTP images URLs instead of HTTPS. But my whole Discourse site is transferred through HTTPS.(Though I noticed that it also sometimes get mix-content problem too)

The possible reason for this is that I used HTTP from the very beginning and later changed to HTTPS and some settings seems not changed…

Can anybody tell me how to fix this?

---

_[View the full topic](https://meta.discourse.org/t/got-mix-content-error-and-confused/66523)._
