File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -235,6 +235,7 @@ builder.url_for("http://images.example.com/images/image2.jpg")
235235- [auto_rotate](https://docs.imgproxy.net/#/generating_the_url_advanced?id=auto-rotate)
236236- [filename](https://docs.imgproxy.net/#/generating_the_url_advanced?id=filename)
237237- [format](https://docs.imgproxy.net/#/generating_the_url_advanced?id=format)
238+ - [return_attachment](https://docs.imgproxy.net/#/generating_the_url_advanced?id=return-attachment)
238239
239240_See [imgproxy URL format guide](https://docs.imgproxy.net/#/generating_the_url_advanced?id=processing-options) for more info._
240241
Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ def configure
100100 # @option options [Boolean] :auto_rotate
101101 # @option options [String] :filename
102102 # @option options [String] :format
103+ # @option options [Boolean] :attachment
103104 # @option options [Boolean] :use_short_options
104105 # @option options [Boolean] :base64_encode_urls
105106 # @option options [Boolean] :escape_plain_url
Original file line number Diff line number Diff line change @@ -64,6 +64,7 @@ class Options < Hash
6464 auto_rotate : Imgproxy ::OptionsCasters ::Bool ,
6565 filename : Imgproxy ::OptionsCasters ::String ,
6666 format : Imgproxy ::OptionsCasters ::String ,
67+ return_attachment : Imgproxy ::OptionsCasters ::Bool ,
6768 } . freeze
6869
6970 META = %i[ size resize adjust ] . freeze
Original file line number Diff line number Diff line change @@ -39,5 +39,6 @@ module Imgproxy
3939 strip_color_profile : :scp ,
4040 auto_rotate : :ar ,
4141 filename : :fn ,
42+ return_attachment : :att ,
4243 } . freeze
4344end
Original file line number Diff line number Diff line change 120120 auto_rotate : true ,
121121 filename : "the_image.jpg" ,
122122 format : :webp ,
123+ return_attachment : true ,
123124 }
124125 end
125126
164165 "sm:1/" \
165166 "scp:0/" \
166167 "ar:1/" \
167- "fn:the_image.jpg"
168+ "fn:the_image.jpg/" \
169+ "att:1"
168170 end
169171
170172 let ( :casted_options_full ) do
207209 "strip_metadata:1/" \
208210 "strip_color_profile:0/" \
209211 "auto_rotate:1/" \
210- "filename:the_image.jpg"
212+ "filename:the_image.jpg/" \
213+ "return_attachment:1"
211214 end
212215 # rubocop: enable Layout/LineEndStringConcatenationIndentation
213216
You can’t perform that action at this time.
0 commit comments