# אוואטרים של משתמשים לא ב-S3 אלא מוגשים דרך discourse\_cdn\_url

**URL:** https://meta.discourse.org/t/user-avatars-not-in-s3-but-served-via-discourse-cdn-url/160920
**Category:** Development
**Created:** [14 באוגוסט,‏ 2020,‏ 7:17pm UTC](https://meta.discourse.org/t/user-avatars-not-in-s3-but-served-via-discourse-cdn-url/160920 "2020-08-14T19:17:39Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Terrapop](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@Terrapop](https://meta.discourse.org/u/Terrapop)
#### Post date: [14 באוגוסט,‏ 2020,‏ 7:17pm UTC](https://meta.discourse.org/t/user-avatars-not-in-s3-but-served-via-discourse-cdn-url/160920/1 "2020-08-14T19:17:39Z")

</div>

While setting up our S3 cached with CloudFront, and origin assets cached with via another CloudFront subdomain, I saw that the user avatars are still hosted and served via [https://cdn-origin.xxxxx.com](https://cdn-origin.xxxxx.com).

Is this correct, or should they not also uploaded and delivered via cdn-uploads from the S3 bucket?

```plaintext
  DISCOURSE_USE_S3: true
  DISCOURSE_S3_REGION: us-east-1
  DISCOURSE_S3_ACCESS_KEY_ID: XXXXXXXXXXXXXXXXXXXXXXXX
  DISCOURSE_S3_SECRET_ACCESS_KEY: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
  DISCOURSE_S3_CDN_URL: https://cdn-uploads.xxxxx.com
  DISCOURSE_S3_BUCKET: xxxxx-uploads
  DISCOURSE_S3_BACKUP_BUCKET: xxxxx-backup
  DISCOURSE_BACKUP_LOCATION: s3
  DISCOURSE_CDN_URL: https://cdn-origin.xxxxx.com

```

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [14 באוגוסט,‏ 2020,‏ 7:20pm UTC](https://meta.discourse.org/t/user-avatars-not-in-s3-but-served-via-discourse-cdn-url/160920/2 "2020-08-14T19:20:35Z")

</div>

Avatars, Stylesheets, Javascripts for themes and others are still served from the app, so they are served via `DISCOURSE_CDN_URL` and not via `DISCOURSE_S3_CDN_URL`.

Moving some of those to `DISCOURSE_S3_CDN_URL` is a long term goal, but there are trade-offs in complexity.

---

<div class="post-metadata">

### Author: ![Terrapop](https://avatars.discourse-cdn.com/v4/letter/t/ecd19e/32.png) [@Terrapop](https://meta.discourse.org/u/Terrapop)
#### Post date: [14 באוגוסט,‏ 2020,‏ 7:21pm UTC](https://meta.discourse.org/t/user-avatars-not-in-s3-but-served-via-discourse-cdn-url/160920/3 "2020-08-14T19:21:30Z")

</div>

Understood, thanks for confirming that all is working as it should then.
