Active Storage S3 Expied images

If you are going to use Active Storage in production, I recommend checking my guide here in the forums, since it’s a through explanation of how it works an all the problems you might face in production.

Section 2.3.3 is where I explain the three modes of operation: redirect (default, which you are probably using), proxy (supports CDN caching), and public (no CDN cache, but simplest to use)

If you decide to use public mode, check this section of the Rails guides for how to do it, and use then change this:

<%= link_to user.avatar %>

To this

<%= link_to user.avatar.url %>
1 Like