# 头像迁移到 S3 兼容的 R2 后加载时间过长

**URL:** <https://meta.discourse.org/t/avatars-take-a-long-time-to-load-after-moving-to-s3-compatible-r2/405827>\
**Category:** Self-hosting\
**Tags:** s3\
**Created:** [2026年六月22日 14:49 UTC](https://meta.discourse.org/t/avatars-take-a-long-time-to-load-after-moving-to-s3-compatible-r2/405827 "2026-06-22T14:49:05Z")\
**Posts on this page:** 1\
**Showing post:** 26

<div class="post-metadata">

**Author:** ![David\_Ghost](https://avatars.discourse-cdn.com/v4/letter/d/c37758/32.png) [@David\_Ghost](https://meta.discourse.org/u/David_Ghost)\
**Post date:** [2026年七月19日 15:00 UTC](https://meta.discourse.org/t/avatars-take-a-long-time-to-load-after-moving-to-s3-compatible-r2/405827/26 "2026-07-19T15:00:37Z")

</div>

大家好，我这两天一直在进行新一轮的测试。以下是我的发现：

- 新创建的账户头像可以即时加载，且适用于所有尺寸（主题列表、主题帖子等）。
- `rake avatar:refresh` 任务并未向 R2 生成任何新图像。我仍然需要点击旧账户的头像才能触发图像生成。这可能是个 Bug？

目前，由于我手动点击了头像，我大部分用户的头像都能即时加载。

我目前的配置是 Cloudflare + Bunny CDN，用于 `discourse_s3_cdn`。

---

_[View the full topic](https://meta.discourse.org/t/avatars-take-a-long-time-to-load-after-moving-to-s3-compatible-r2/405827)._
