File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,6 +236,7 @@ builder.url_for("http://images.example.com/images/image2.jpg")
236236- [filename](https://docs.imgproxy.net/#/generating_the_url_advanced?id=filename)
237237- [format](https://docs.imgproxy.net/#/generating_the_url_advanced?id=format)
238238- [return_attachment](https://docs.imgproxy.net/#/generating_the_url_advanced?id=return-attachment)
239+ - [expires](https://docs.imgproxy.net/#/generating_the_url?id=expires)
239240
240241_See [imgproxy URL format guide](https://docs.imgproxy.net/#/generating_the_url_advanced?id=processing-options) for more info._
241242
Original file line number Diff line number Diff line change @@ -101,6 +101,7 @@ def configure
101101 # @option options [String] :filename
102102 # @option options [String] :format
103103 # @option options [Boolean] :return_attachment
104+ # @option options [Integer] :expires
104105 # @option options [Boolean] :use_short_options
105106 # @option options [Boolean] :base64_encode_urls
106107 # @option options [Boolean] :escape_plain_url
Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class Options < Hash
6565 filename : Imgproxy ::OptionsCasters ::String ,
6666 format : Imgproxy ::OptionsCasters ::String ,
6767 return_attachment : Imgproxy ::OptionsCasters ::Bool ,
68+ expires : Imgproxy ::OptionsCasters ::Integer ,
6869 } . freeze
6970
7071 META = %i[ size resize adjust ] . freeze
Original file line number Diff line number Diff line change @@ -40,5 +40,6 @@ module Imgproxy
4040 auto_rotate : :ar ,
4141 filename : :fn ,
4242 return_attachment : :att ,
43+ expires : :exp ,
4344 } . freeze
4445end
Original file line number Diff line number Diff line change 121121 filename : "the_image.jpg" ,
122122 format : :webp ,
123123 return_attachment : true ,
124+ expires : Time . at ( 4810374983 ) ,
124125 }
125126 end
126127
166167 "scp:0/" \
167168 "ar:1/" \
168169 "fn:the_image.jpg/" \
169- "att:1"
170+ "att:1/" \
171+ "exp:4810374983"
170172 end
171173
172174 let ( :casted_options_full ) do
210212 "strip_color_profile:0/" \
211213 "auto_rotate:1/" \
212214 "filename:the_image.jpg/" \
213- "return_attachment:1"
215+ "return_attachment:1/" \
216+ "expires:4810374983"
214217 end
215218 # rubocop: enable Layout/LineEndStringConcatenationIndentation
216219
You can’t perform that action at this time.
0 commit comments