title: Rails ActiveStorage: how to avoid one redirect for each image?
body: <p>If you use ActiveStorage and you have a page with N images you get N additional requests to your Rails app (i.e. N redirects). That means wasting a lot of server resources if you have tens of images on a page.</p>
  
  <p>I know that the redirect is useful for signed URLs. However I wonder why Rails does not precompute the final signed URL and embed that into the HTML page... In this  way we could keep the advantages of signed URLs / protected files, without making N additional calls to the Rails server.</p>
  
  <p>Is it possible to include the final URL / pre-signed URL of image variants directly in the HTML (thus avoiding the redirect)? Otherwise, why is that impossible?</p>