23

sstatic.net images aren't displayed on (some?) other sites outside the SE network. E.g. from https://redd.it/1by90jk:

enter image description here

and:

enter image description here

That's a regression compared to https://i.stack.imgur.com/ images, which could be displayed almost anywhere.

9
  • 2
    Please provide a link to the page on which you tried to share that post, as we might be able to determine why this happens (and a URL is necessary in order to reproduce the issue). It's possible the issue is something in SE's configuration of the domain, but it's also possible that it's the result of choices on the part of the site on which you attempted to share that post.
    – Makyen
    Commented Apr 7 at 18:26
  • @Makyen redd.it/1by90jk Commented Apr 7 at 18:28
  • 12
    When I follow the direct link to the image from Reddit, I get an error that SE has decided to not allow hotlinking from that resource. On the other hand, Imgur had no such provision. Commented Apr 7 at 19:36
  • Might as well be the default behavior of the host, i.e. not something SE set on purpose. Commented Apr 8 at 7:49
  • 1
    why does your image ID have so many characters? oh heck- did they remove the fixed 5 character length? also, the resource failed on first fetch for me and then worked on subsequent requests.
    – starball
    Commented Apr 8 at 9:57
  • Related to this, I guess - I can't even use the i.sstatic.net URL to upload the image on the site (MSE): I get "An error occurred, please try again" when I use it. Even though the response is a 200, actually it's Success: false.
    – VLAZ
    Commented Apr 8 at 10:03
  • 2
    Similar to the example by VLAZ, the chat uploader won't accept an i.sstatic image either. But I can paste the URL directly into chat. chat.stackexchange.com/transcript/message/65468531#65468531
    – PM 2Ring
    Commented Apr 8 at 10:18
  • Possibly related: meta.stackexchange.com/q/399031/334566
    – PM 2Ring
    Commented Apr 10 at 12:22
  • 1
    @VLAZ, in your image with the error, it looks like it was still uploading to imgur at the time. Now that we've finished rollout to all sites, you should be able to "upload" an sstatic image. But by which we mean, just immediately return that same URL because there's no sense in uploading it twice. But it should work without error now.
    – KyleMit StaffMod
    Commented Apr 30 at 18:50

1 Answer 1

21

This change is by design, as part of our migration from Imgur to a self-hosted image service. I’ll describe a bit of information as to why we’ve made this change, and what you can do if your site or service is directly impacted.

The spirit of this answer can be, in essence, distilled down to one sentence:

Stack Exchange is not an all-purpose image hosting provider

While it is true that Stack Exchange must host images as part of how we do business, we are not fundamentally an open-access image hosting provider, in the way services like Imgur are. Our goal in this migration is to allow users who want to create posts with images on Stack Exchange to continue to do so as normal. However, we did not want our service to be used to enable image hosting on the internet more generally.

While we could in theory serve as some form of general Internet image-hosting service, there are many good reasons for us not to do so. These reasons include:

  • We want to control bandwidth costs. While our CDN helps reduce the overall bandwidth costs for hosting images, we still need to control the scope to which we host images. The scope we need to operate our business is that users have to upload images for use on Stack Exchange.
  • We want to control our storage costs. Storing images has a nontrivial cost that's compounded by our disaster recovery configuration. Just like with bandwidth costs, we need to limit the scope of the images we host.
  • We want to prevent abuse. Imgur was built to be a universal image hosting service, and was built with processes and procedures to match. When dealing with general images on the Internet, safety and abuse are both frequent and serious concerns. While we can absolutely manage images that are uploaded to Stack Exchange for use here, we unfortunately do not have the resources to manage images uploaded for use throughout the Internet.

Only certain sites are allowed to load images from Stack Exchange

In order to mitigate improper usage of images uploaded to our image service, only a select list of sites (on our “allowlist”) may load images that were uploaded to Stack Exchange. This means that images will be restricted from loading under the following situations:

  1. An image is embedded or linked within a site that is not on our allowlist. This is by far the most common situation under which an image will fail to load.
  2. Some browser extensions may modify metadata sent when requesting images. This could prevent users from loading images hosted on Stack Exchange properly, even when they would otherwise be allowed.
  3. Certain proxies installed on a user’s computer or network may intercept and alter the request’s referrer, leading to an image failing to load.

Whether or not a given image loads is managed by CloudFlare’s hotlink protection service, which we can configure.

If you have a compelling need to load Stack Exchange-hosted images, ask on Meta

In the event a user, site, or service has a compelling reason why they need access to load Stack Exchange images, we will review accordingly. Please post such requests on Meta Stack Exchange, and we will review them using our status-review process. We will principally be looking for a good business reason why that allowance should be made, and we will evaluate the risks of allowing that site or service as well.

While we don’t intend to disclose the entire allowlist, examples include:

  • Common search engines, so that they may load and view content on Stack Exchange properly.
  • Common translation services, so users can translate pages to their native language.
  • Common RSS feed readers, which users use to follow content posted on Stack Exchange.

To set expectations up front, we do not intend to allow a large number of sites or services to load Stack Exchange-hosted images. However, there are absolutely situations in which a user, site, or service will have a compelling reason to access images hosted by Stack Exchange.

6
  • 11
    That is great, but I'm disappointed that you didn't do a very easy and trivial step: tell us about that in advance, instead of waiting for a bug report, and then some more. So, thumbs down, overall. Commented May 13 at 17:23
  • 2
    Does this apply to Stack Overflow for Teams? Specifically, if I need to upload an image to SOfT and want to embed it elsewhere (like GitHub), will that work? Limiting image viewing to only people with SOfT access can sometimes be handy.
    – cocomac
    Commented May 13 at 19:00
  • 9
    @cocomac Stack Overflow for Teams has a completely different image hosting architecture due to its unique scale and security requirements, and unfortunately I don't honestly know the details of how that works. However, to my knowledge SOfT's image hosting architecture hasn't changed with the i.sstatic.net changeover, so if it worked before, then it should work for the future as well.
    – Slate StaffMod
    Commented May 13 at 19:24
  • 6
    @cocomac Teams image hosting has always been private. You can technically load the image from anywhere, but you must have an active session on the site connected to that team in order to view the image, which greatly reduces any benefit of trying to hotlink it to external places. Most people will just get a 404 page for not being logged in or not being a member of the team.
    – animuson StaffMod
    Commented May 24 at 5:12
  • Would community-led SE-adjacent tools be considered for inclusion in the allowlist? E.g. Smoke Detector?
    – Robotnik
    Commented May 24 at 5:29
  • 2
    @Robotnik Yes, if Smoke Detector is running into trouble with i.sstatic.net images, I suspect we'd want to address that (but I won't make a final call in an off-the-cuff comment ;) - SD should have some internal escalation routes to help with requests like that.
    – Slate StaffMod
    Commented May 24 at 14:18

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .