You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -116,36 +116,36 @@ See [my configurations](#advanced-settings) to know how it works.
116
116
117
117
### Remote images
118
118
119
-
With the same presets as above examples, we are going to serve an image [by NASA](https://www.nasa.gov/sites/default/files/thumbnails/image/esp_040663_1415.jpg) using the alias `@nasa`, that will be added in these URLs.
119
+
With the same presets as above examples, we are going to serve an image [by NASA](https://mars.nasa.gov/system/downloadable_items/40368_PIA22228.jpg) using the alias `@nasa`, that will be added in these URLs.
120
120
121
121
<small>Note: the image source is from NASA, it may be unavailable in the future.</small>
122
122
123
123
> Image with no preset (it is resized to max-width=1600 as default).<br/>
124
-
> http://localhost/@nasa/esp_040663_1415.jpg
124
+
> http://localhost/@nasa/40368_PIA22228.jpg
125
125
126
126
127
127
> The image with preset `_w200` applied (`200` is a dynamic number).<br/>
@@ -157,21 +157,54 @@ You can learn how to serve files from private storage in the [configurations sec
157
157
158
158
### Customize resizing via query string
159
159
160
+
#### Image width and height
161
+
160
162
You can also parse arguments from the request's query string, such as `?width=300` for the image's width or `?height=200` for the image's height, or even both of demensions, to flexibly change some parameters for resizing.
161
163
162
164
In this setup example, I used the `width` and `height` arguments to override the existing presets.
In addition, you can override the default quality defined by `IMGPROXY_FORMAT_QUALITY` in the `docker-compose.yml` file by passing a `quality` value (ranging from 1 to 100) in the query string of the request. For example, adding `?quality=100` will set the output image quality to 100% (the best quality).
181
+
182
+
> Image with `quality` is set.<br/>
183
+
> You can check the download size of the image using browser's Developer Tools.<br/>
184
+
> http://localhost/cacti.jpg?quality=1
185
+
>
186
+
> http://localhost/cacti.jpg?quality=10
187
+
>
188
+
> http://localhost/cacti.jpg?quality=50
189
+
>
190
+
> http://localhost/cacti.jpg?quality=80
191
+
>
192
+
> http://localhost/cacti.jpg?quality=100
193
+
194
+
> Image quality with a human readable `quality` value.<br/>
195
+
> You can check the download size of the image using browser's Developer Tools.<br/>
196
+
> http://localhost/cacti.jpg?quality=low
197
+
>
198
+
> http://localhost/cacti.jpg?quality=clear
199
+
>
200
+
> http://localhost/cacti.jpg?quality=high
201
+
>
202
+
> http://localhost/cacti.jpg?quality=highest
203
+
204
+
> You can combine the `quality` option with any above preset.<br/>
@@ -282,7 +315,7 @@ Then run the command in the [Start the server](#start-the-server) section to res
282
315
283
316
### Advanced settings
284
317
285
-
All settings for handling image URLs are written in the [`imgproxy.conf`](imgproxy.conf#L70~L234) file using [Nginx's map directives](https://Nginx.org/en/docs/http/ngx_http_map_module.html#directives).
318
+
All settings for handling image URLs are written in the [`imgproxy.conf`](imgproxy.conf#L70~L250) file using [Nginx's map directives](https://Nginx.org/en/docs/http/ngx_http_map_module.html#directives).
286
319
287
320
I keep all configurations in very simple variables. You can also make your own version from this base.
288
321
@@ -317,7 +350,7 @@ I keep all configurations in very simple variables. You can also make your own v
0 commit comments