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
This command compiles Caddy with the image processing module included.
43
+
This command compiles Caddy with the image processing module included.
32
44
33
45
## Usage
34
46
35
-
Follow these steps to utilize the image processing capabilities:
36
47
37
-
1. Install Caddy and libvips on your system.
38
-
2. Build Caddy with the image processing module using xcaddy.
39
-
3. Configure your Caddyfile to include the image processing module for specific routes or sites.
40
-
4. Start Caddy, and access your images with processing options via URL query parameters.
48
+
### Using Docker
41
49
42
-
## Available Query Parameters
50
+
```bash
51
+
docker run -p 80:80 -v $PWD/Caddyfile:/etc/caddy/Caddyfile -d ghcr.io/quix-labs/caddy-image-processor:latest
52
+
```
53
+
54
+
Your can see more information in the [official docker documentation for caddy](https://hub.docker.com/_/caddy)
55
+
56
+
### Using xcaddy build
57
+
58
+
```bash
59
+
/path/to/your/caddy run --config /etc/caddy/Caddyfile
60
+
```
61
+
62
+
Your can see more information in the [official documentation for caddy](https://caddyserver.com/docs/build#package-support-files-for-custom-builds-for-debianubunturaspbian)
43
63
44
-
- or: Orientation (e.g., 90, 180, 270)
45
-
- crop: Crop (1 for true, 0 for false)
46
-
- w: Width
47
-
- h: Height
48
-
- blur: Blur amount
49
-
- q: Quality
50
-
- fm: Format (e.g., jpg, png, gif, webp, avif)
51
64
52
65
## Example Caddyfile
66
+
53
67
```plaintext
54
68
{
55
69
order image_processor before respond
@@ -62,7 +76,19 @@ localhost {
62
76
}
63
77
```
64
78
65
-
In this example, requests to `/images*` undergo processing by the image processor module before being served by the reverse proxy.
79
+
In this example, all requests undergo processing by the image processor module before being served by the
80
+
caddy.
81
+
82
+
## Available Query Parameters
83
+
84
+
- or: Orientation (e.g., 90, 180, 270)
85
+
- crop: Crop (1 for true, 0 for false)
86
+
- w: Width
87
+
- h: Height
88
+
- blur: Blur amount
89
+
- q: Quality
90
+
- fm: Format (e.g., jpg, png, gif, webp, avif)
91
+
66
92
67
93
## Planned Features
68
94
@@ -71,7 +97,8 @@ The following features are planned for future implementation:
0 commit comments