imgproxy-rails
imgproxy-rails copied to clipboard
Suggestion: update README to recommend disabling ActiveStorage variant tracking
Is your feature request related to a problem? Please describe.
When using ActiveStorage's with_attached_*
, it will try to eager load any variants in the database as described here:
If
ActiveStorage.track_variants
is enabled, it will also include the variants record and their attached blobs.
https://edgeapi.rubyonrails.org/classes/ActiveStorage/Attached/Model.html#method-i-with_attached_-2A
This setting is enabled by default.
This leads to unnecessary database calls when using imgproxy-rails
, as no variants will be stored in the database anyway.
Describe the solution you'd like
Recommend users, or at least suggest to them, to disable variant tracking if they use imgproxy-rails
config.active_storage.track_variants = false