0

In development, images are typically served out of app/assets/images and requests for those assets pass through the regular Rails middleware stack. However, normally in production they are served out of public/assets by the webserver and requests never hit the rails app. Is there any way in production to arrange for some images (say in a particular sub-directory of app/assets/images) to be served by the app instead, in the same way they are in development, for example so that requests could be monitored by middleware?

The use case is I'm sending emails with images in them, and I'm just curious whether there might be a way to log the image requests as a way of telling how many emails are actually being opened.

0 Answers0