Skip to content

Suggestion: update README to recommend disabling ActiveStorage variant tracking #7

Open
@marckohlbrugge

Description

@marckohlbrugge

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions