What are the limitations of download remote images

I’ve enabled the Download remote images to local option in the admin settings (I’m assuming this isn’t a per user option).

Then I created a test post:


[Some Text](http://3.bp.blogspot.com/-J9fTEDADHTQ/TejcTyXqfFI/AAAAAAAAADQ/SlOrlRq2M9c/s1600/TESTING-white.png)


The results showed that all the 3 images still pointed to the remote server (atleast the code didnt’ change to show it was pointing locally or to amazon). Note that I’ve enabled the option to upload content to Amazon S3 (if that matters).

I’ve been through some posts which talk about ways to prevent it from downloading but in this case the 3 most common ways of posting an image doesn’t seem to download it.

So under what conditions does downloading remote images work and what’s the best way to configure it?

If Download remote images to local SiteSetting enabled whenever a post created then all the external images will be downloaded locally (In all 3 above cases). But the downloading process will start only after editing_grace_period SiteSetting (default 10 minutes) from the creation of post. Also it will not be triggered for existing old posts when you enable the Download remote images to local SiteSetting. For that you have to recook all old posts.

Also downloading remote images will not work in below conditions

  1. SiteSetting download_remote_images_to_local is disabled.
  2. Enough disk space not available to download. (In this case you will receive notification about the problem). Also look at the download remote images threshold SiteSetting.
  3. If the post date is before download_remote_images_max_days_old SiteSetting.
  4. If the image is from one of the domains of disabled image download domains SiteSetting.

Great thanks that worked, also want to clarify for the benefit of others, in my examples above, the 1st and 3rd options WILL lead to an automatic download after the conditions in your post are satisfied. However the 2nd example, WILL NOT download the remote image.

So, these WILL automatically download (after your conditions are satisfied, the code will be replaced to reflect the local url or amazon S3 url)

  • Directly posting the link
  • Images using the [img] and [/img] tags


And these WILL NOT automatically download (code will not be changed)

  • When images are hyperlinked to text
[Some Text](http://3.bp.blogspot.com/-J9fTEDADHTQ/TejcTyXqfFI/AAAAAAAAADQ/SlOrlRq2M9c/s1600/TESTING-white.png)
1 Like

By “remote images” we mean “inlined images not stored in Discourse”.

When you do “[Some text](://link-to.com/image.png)”, the image is not inlined, it’s linked.


Looking at doing this and turning it on… does max image size kb impact what it will and will not pull?

For instance, we use a lot of gifs from giphy.com and many of these are larger than the default size of 3072kB.

1 Like