In a discussion about hotlinking SSO avatars, Nuck asks if Discourse can render avatar URLs directly rather than downloading and storing them, aiming to leverage their S3/Varnish setup and avoid double storage costs. codinghorror suggests using fixed random avatars for new users, but Nuck clarifies they need the original SSO URL to be used without mirroring. Falco notes that direct URL usage is possible if avatars follow a specific path format. riking recommends the external system avatar functionality, providing a hash-based URL pattern, though he notes this may not work on hosted Discourses due to global overrides. Nuck responds that the external method requires messy redirects and expresses a preference for using the external_id to generate actual URLs directly.
So, SSO allows overriding avatars, but if I’m not mistaken it just downloads the avatar image and stores them in the Discourse system.
Is it possible to actually allow overriding the URL, maybe providing a set of multiple prescaled images? I’m storing them on S3 with a Varnish cache in front, so it reduces my caching effectiveness and more or less doubles the costs to have two sets of avatars.
To do this would require a redirect for each avatar, which seems rather messy. It’d be nice if I could use external_id in there, then I could generate the actual URLs