# 头像迁移到 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:** 4

<div class="post-metadata">

### Author: ![Lilly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lilly/32/575047_2.png) [@Lilly](https://meta.discourse.org/u/Lilly)
#### Post date: [2026年六月22日 20:44 UTC](https://meta.discourse.org/t/avatars-take-a-long-time-to-load-after-moving-to-s3-compatible-r2/405827/4 "2026-06-22T20:44:00Z")

</div>

> [@David\_Ghost](#):
>
> 以前对我有效的方法是：先点击头像一次；第二次点击时，它就会立即打开。不过这可能跟缓存有关。另外，我刚才测试了你的第二个建议，返回的是“HTTP/2 301”，后面还有几行其他内容。第三个建议也一样。我过几天会再运行一次 avatars:refresh，因为我之前需要恢复一个快照。再次感谢！

是的，根据你的回复，我几乎可以确定是问题 #1，因为针对 Cloudflare 和 Gravatar 的 `curl` 命令结果看起来都符合预期。方便的时候请尝试运行 `rake avatars:refresh`，并告诉我是否有效。

---

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