# Try to force https instead of downloading remote images

**URL:** https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399
**Category:** Feature
**Created:** [December 24, 2014, 2:06pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399 "2014-12-24T14:06:27Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Moter8](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moter8/32/120941_2.png) [@Moter8](https://meta.discourse.org/u/Moter8)
#### Post date: [December 24, 2014, 2:06pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/1 "2014-12-24T14:06:27Z")

</div>

`https://i.imgur.com/pCSKvWK.jpg` should get rewritten to `https://i.imgur.com/pCSKvWK.jpg` and with that the whole http images on https site problem gets fixed.

This could probably get done by whitelisting common domains or checking if the site gives back `301` or `302` 's to the https link.

Or even in the Editor itself, if it detects a http image link it could check if a https one exists too and put in a `s` in the URL.

* * *

This would be great for basically everybody – less admins would want to use the “download remote images” option and would save traffic that way but also the users get the images faster (Imgur will have a better CDN than your self-hosted Discourse).

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [December 24, 2014, 2:16pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/2 "2014-12-24T14:16:27Z")

</div>

> [@Moter8](#):
>
> the users get the images faster (Imgur will have a better CDN than your small site).

When you mean ‘your small site’, do you mean every Discourse user who self-hosts? Or just the hosted Discourse instances offered by the devs?

As a different viewpoint: I prefer to have all remote images downloaded to me if the poster of the image _wants_ that. If they don’t want their image on my server, I am okay with that too, and I’ll honor that. If imgur has a hiccup or ever goes down, then my inline images become broken. Pushing a hosting responsibility away from me and onto a third party leaves the chance that I have no control over what happens to the images served from that third party.

But I do agree there should be an option if an admin wishes to serve images from imgur or any other third party. And I also agree if a well-known site serves https, then it should reflect with links in the conversation to make sure the connection is always secure.

---

<div class="post-metadata">

### Author: ![Moter8](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moter8/32/120941_2.png) [@Moter8](https://meta.discourse.org/u/Moter8)
#### Post date: [December 24, 2014, 2:42pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/3 "2014-12-24T14:42:12Z")

</div>

> [@purldator](#):
>
> When you mean ‘your small site’, do you mean every Discourse user who self-hosts? Or just the hosted Discourse instances offered by the devs?

Yes I meant self-hosted Discourse installations with that. Not everybody can pay for CDN’s and why not use Imgur when they already host it?

> [@purldator](#):
>
> As a different viewpoint: I prefer to have all remote images downloaded to me if the poster of the image wants that. If they don’t want their image on my server, I am okay with that too, and I’ll honor that.

Sure, but does the User know of the consequences? He may not know that he is uploading copyrighted Images.

This is another dangerous detail of downloading remote images. Discourse simply downloads every image that gets posted and possibly infringes copyrights etc.

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [December 24, 2014, 2:59pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/4 "2014-12-24T14:59:45Z")

</div>

> [@Moter8](#):
>
> Sure, but does the User know of the consequences? He may not know that he is uploading copyrighted Images. [/quote]
> 
> I was thinking along the lines of a member who is a copyright holder _and_ who doesn’t want to grant me an all-inclusive licence to use/do whatever to their work to host it on my forum.
> 
> As for copyrighted images on imgur…I have never come across where they are being pulled down left and right. Only time was the whole celebrity nude photo drama. Otherwise, I don’t think I’ve ever heard of any prominent DMCA notices forced onto imgur. I’d have to check chilling effects.
> 
> [quote]This is another dangerous detail of downloading remote images. Discourse simply downloads every image that gets posted and possibly infringes copyrights etc.

Again, see above. If it does happen, then there’s plenty of options for a copyright holder to take action. DMCA/C&D. I’ve learned that trying to _prevent_ things like that is only going to cause stress. Unless if your forum members are engaging in torrents/warez. if not, then you should be fine.

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [December 24, 2014, 6:45pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/5 "2014-12-24T18:45:59Z")

</div>

You may be interested in the `disabled image download domains` admin setting.

> Remote images will never be downloaded from these domains. Pipe-delimited list.

So you can go ahead and put `i.imgur.com` in there.

> [@purldator](#):
>
> If it does happen, then there’s plenty of options for a copyright holder to take action. DMCA/C&D. I’ve learned that trying to prevent things like that is only going to cause stress

> **[Glossary — Python 2.7.18 documentation](https://docs.python.org/2/glossary.html#term-eafp)**
>
> The default Python prompt of the interactive shell. Often seen for code examples which can be executed interactively in the interpreter.

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [December 24, 2014, 7:11pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/6 "2014-12-24T19:11:08Z")

</div>

> [@riking](#):
>
> [Glossary — Python 2.7.18 documentation](https://docs.python.org/2/glossary.html#term-eafp)

That’s another good way of putting it too. I can control myself but I can’t micromanage a whole forum of members. Best to do damage control when variables such as people in groups is truly out of my hands and no amount of prior prevention can erase it.

---

<div class="post-metadata">

### Author: ![Moter8](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moter8/32/120941_2.png) [@Moter8](https://meta.discourse.org/u/Moter8)
#### Post date: [December 24, 2014, 7:15pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/7 "2014-12-24T19:15:01Z")

</div>

> [@riking](#):
>
> You may be interested in the disabled image download domains admin setting.

That’s not what I’m interested in at all. Not sure why this would help me. I don’t want to download any remote images but at the same time use https for the images wherever possible.

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [December 24, 2014, 8:50pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/8 "2014-12-24T20:50:12Z")

</div>

> [@Moter8](#):
>
> That’s not what I’m interested in at all. Not sure why this would help me. I don’t want to download any remote images but at the same time use https for the images wherever possible.

It would at least allow you to block sites that you know have content you can’t or won’t post.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 24, 2014, 9:32pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/9 "2014-12-24T21:32:32Z")

</div>

This is not the reason the feature exists at all. Download remote images exists so that images can’t be pulled or remote sites go offline, breaking your post when the image disappears.

You can use protocol agnostic URLs as well, in many cases.

---

<div class="post-metadata">

### Author: ![purldator](https://avatars.discourse-cdn.com/v4/letter/p/bcef8e/32.png) [@purldator](https://meta.discourse.org/u/purldator)
#### Post date: [December 25, 2014, 4:17am UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/10 "2014-12-25T04:17:13Z")

</div>

> [@codinghorror](#):
>
> Download remote images exists so that images can’t be pulled or remote sites go offline, breaking your post when the image disappears.

Exactly. As I expressed above in another reply to the OP: the integrity of my forum’s archive means everything to me. A few extra milliseconds (or even a full second or two) for someone in Australia to download images from my New Jersey location is, I think, a good trade off for a very long-term and important commitment.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [December 25, 2014, 4:18am UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/11 "2014-12-25T04:18:28Z")

</div>

Well setting up a CDN is easy if you want better global load times for static assets. See the howto category under cdn.

---

<div class="post-metadata">

### Author: ![dev221117](https://avatars.discourse-cdn.com/v4/letter/d/43a26b/32.png) [@dev221117](https://meta.discourse.org/u/dev221117)
#### Post date: [December 28, 2014, 8:05am UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/15 "2014-12-28T08:05:12Z")

</div>

> [@Moter8](#):
>
> He may not know that he is uploading copyrighted Images.

Is this still a problem though? We live in 2014, it’s common place for people to download and re use images uploaded on the internet, whether it be a photo of natural sights, cities, faces of people, or snapshots from tv shows, games, films, books etc. Besides, most of the time, images from films, tv serials, games, books etc don’t hurt the owners significantly. I’ve seen it become a problem only when people take images from news articles, or from websites selling them.

As such, trying to stop people from putting good images simply because someone else owns them will just create more annoyances than anything else. You don’t want to be as restrictive of images as Wikipedia, do you? 😛

---

<div class="post-metadata">

### Author: ![riking](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/riking/32/170938_2.png) [@riking](https://meta.discourse.org/u/riking)
#### Post date: [July 9, 2015, 5:53pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/16 "2015-07-09T17:53:32Z")

</div>

As of [Add "always https" declarations by riking · Pull Request #306 · discourse/onebox · GitHub](https://github.com/discourse/onebox/pull/306), [i.imgur.com](http://i.imgur.com) URLs will always be HTTPS 😃

---

<div class="post-metadata">

### Author: ![Moter8](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moter8/32/120941_2.png) [@Moter8](https://meta.discourse.org/u/Moter8)
#### Post date: [July 9, 2015, 7:02pm UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/17 "2015-07-09T19:02:21Z")

</div>

Welp, I was kinda annoyed that it was “ignored” 6 months ago, but also glad now that it has been fixed now. Woo!

---

<div class="post-metadata">

### Author: ![chapoi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/chapoi/32/537252_2.png) [@chapoi](https://meta.discourse.org/u/chapoi)
#### Post date: [December 4, 2025, 11:33am UTC](https://meta.discourse.org/t/try-to-force-https-instead-of-downloading-remote-images/23399/18 "2025-12-04T11:33:26Z")

</div>


