@@ -850,11 +850,14 @@ location.
850
850
<%= image_tag user.avatar.variant(resize_to_limit: [100, 100]) % >
851
851
` ` `
852
852
853
- If a variant is requested, Active Storage will automatically apply
853
+ If a variant is requested, Active Storage will automatically apply
854
854
transformations depending on the image's format :
855
855
856
- 1. Content types that are [`variable`] and not considered [`web images`], will be converted to PNG.
857
- 2. If `quality` is not specified, the variant processor's default quality for the format will be used.
856
+ 1. Content types that are variable (as dictated by `config.active_storage.variable_content_types`)
857
+ and not considered web images (as dictated by `config.active_storage.web_image_content_types`),
858
+ will be converted to PNG.
859
+
860
+ 2. If `quality` is not specified, the variant processor's default quality for the format will be used.
858
861
859
862
The default processor for Active Storage is MiniMagick, but you can also use
860
863
[Vips][]. To switch to Vips, add the following to `config/application.rb` :
@@ -876,8 +879,6 @@ specific:
876
879
` ` `
877
880
878
881
[`variant`] : https://api.rubyonrails.org/classes/ActiveStorage/Blob/Representable.html#method-i-variant
879
- [`web images`] : https://github.com/rails/rails/blob/main/activestorage/lib/active_storage/engine.rb#L47
880
- [`variable`] : https://github.com/rails/rails/blob/main/activestorage/lib/active_storage/engine.rb#L34
881
882
[Vips] : https://www.rubydoc.info/gems/ruby-vips/Vips/Image
882
883
883
884
# ## Previewing Files
0 commit comments