# Images URLs are broken (https: part not being included)

**URL:** https://meta.discourse.org/t/images-urls-are-broken-https-part-not-being-included/205365
**Category:** Support
**Created:** [October 6, 2021, 3:35pm UTC](https://meta.discourse.org/t/images-urls-are-broken-https-part-not-being-included/205365 "2021-10-06T15:35:55Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Brady\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brady_p/32/235984_2.png) [@Brady\_P](https://meta.discourse.org/u/Brady_P)
#### Post date: [October 6, 2021, 3:35pm UTC](https://meta.discourse.org/t/images-urls-are-broken-https-part-not-being-included/205365/1 "2021-10-06T15:35:55Z")

</div>

Hello, for some reason my post attachment image urls are not being returned correctly, the “http:” is not included so the _image\_url_ field instead of returning:

_[https://mydomain/uploads/default/](https://mydomain/uploads/default/)…"_

it returns:

_“//mydomain/uploads/default/..”_

It happened overnight and I have no idea why, I haven’t changed anything on my server config for a long time.

Any ideas, this is killing me =(

Thank you

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [October 6, 2021, 3:51pm UTC](https://meta.discourse.org/t/images-urls-are-broken-https-part-not-being-included/205365/2 "2021-10-06T15:51:35Z")

</div>

How did you install Discourse?

Are those images no longer displaying?

---

<div class="post-metadata">

### Author: ![Brady\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/brady_p/32/235984_2.png) [@Brady\_P](https://meta.discourse.org/u/Brady_P)
#### Post date: [October 6, 2021, 4:24pm UTC](https://meta.discourse.org/t/images-urls-are-broken-https-part-not-being-included/205365/3 "2021-10-06T16:24:41Z")

</div>

I installed discourse in a ubuntu server digital ocean droplet like 1 years ago. It’s been flawless until today which I found this error. I discovered that enabling “enforce https” solves the problem but why didn’t I need it until today? I’m not sure.

---

<div class="post-metadata">

### Author: ![Simon\_Manning](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon_manning/32/198596_2.png) [@Simon\_Manning](https://meta.discourse.org/u/Simon_Manning)
#### Post date: [October 6, 2021, 4:44pm UTC](https://meta.discourse.org/t/images-urls-are-broken-https-part-not-being-included/205365/4 "2021-10-06T16:44:49Z")

</div>

If the URL format changed without you doing anything, my assumption would be that your server automatically updates Discourse and this was the trigger but I wouldn’t expect the URL comparison you used to be a problem. Unless you’re displaying that URL to users for them to be able to copy, it should work as-is.

A URL beginning “//” uses the same scheme as the document referencing it, i.e. if you successfully visit the page over HTTP, it’s equivalent to “http://”. If you visit the page over HTTPS, it’s equivalent to “https://”

---

<div class="post-metadata">

### Author: ![Simsnet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simsnet/32/72855_2.png) [@Simsnet](https://meta.discourse.org/u/Simsnet)
#### Post date: [October 6, 2021, 4:46pm UTC](https://meta.discourse.org/t/images-urls-are-broken-https-part-not-being-included/205365/5 "2021-10-06T16:46:08Z")

</div>

Mixed content warnings. Modern browsers are blocking HTTP (insecure) content from loading over HTTPS (secure) connections.

When you have “Force HTTPS” enabled, every URL that Discourse loads will be secure.
