With S3 enabled, image's being redirected to respective S3 URLs

For example, go to my forum. On the home page, the URL to the “system” user’s avatar you see is: https://discourse.aahan.me/user_avatar/discourse.aahan.me/system/25/3.png

Open the image in a new tab, and it redirects to: https://discourse-aahan-me.s3.amazonaws.com/40c02a6e22dbe066ce83e32e0b2d09e8dd2bad4643_25x25.png

Here’s the thing. Even after enabling S3 for off-loading uploads to, the forum is still referencing the original URLs, instead of the S3 URL. This not only results in greater loading time, but also puts unnecessary load on the server.

Is this intended?

1 Like

Yes that’s how it works. We proxy the image link to S3 because we’re generating thumbnails on the fly.

Performance-wise, the redirection is only done once since the image is heavily cached on the client.

1 Like

Wish there was a better way, but yeah, as the images are cached, it should be fine.

1 Like