Skip to content

Commit a52e2a6

Browse files
committed
docs (wip)
1 parent 3230e14 commit a52e2a6

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

README.md

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Easy, URL-based image transformations inspired by [Cloudflare Images](https://de
1616

1717
## Requirements
1818

19-
- \>= PHP 8.4
20-
- Laravel 12.x
19+
- \>= PHP 8.4
20+
- Laravel 12.x
2121

2222
> [!IMPORTANT]
2323
> It is highly recommended to set a minimum memory limit of 256MB in your `php.ini` file to avoid memory issues when images are being processed.
@@ -43,15 +43,35 @@ php artisan vendor:publish --tag="image-transform-url-config"
4343
2. Test your first image transformation:
4444

4545
Use the following URL format to transform your images:
46+
4647
```
4748
http://<domain>/<route-prefix>/<options>/<path-to-your-image.<extension>>
4849
```
4950

5051
for example:
52+
5153
```
5254
http://localhost:8000/image-transform/width=250,quality=80,format=webp/foo/bar/example.jpg
5355
```
5456

57+
## Options
58+
59+
> [!INFO]
60+
> The options are separated by commas and their values are appended with equal signs. The order of options does not matter.
61+
62+
| Option | Description | Type | Possible Values |
63+
| ---------- | ------------------------------------ | ------ | ------------------------------------------------------------- |
64+
| `width` | Set the width of the image. | number | Values greater than the original width will be ignored. |
65+
| `height` | Set the height of the image. | number | Values greater than the original height will be ignored. |
66+
| `quality` | Set the quality of the image. | number | `0` to `100` |
67+
| `format` | Set the format of the image. | string | Supported formats: `jpg`, `jpeg`, `png`, `gif`, `webp`. |
68+
| `blur` | Set the blur level of the image. | number | `0` to `100` |
69+
| `contrast` | Set the contrast level of the image. | number | `-100` to `100` |
70+
| `flip` | Flip the image. | string | `h`(horizontal), `v`(vertical), `hv`(horizontal and vertical) |
71+
72+
> [!CAUTION]
73+
> The `blur` option is a resource-intensive operation and may cause memory issues if the image is too large. It is recommended to use this option with caution, or disable it in the config.
74+
5575
## Testing
5676

5777
```bash
@@ -68,8 +88,9 @@ TODO
6888

6989
## Credits
7090

71-
- [Aaron Francis](https://github.com/aarondfrancis) for the [original idea and foundational work](https://aaronfrancis.com/2025/a-cookieless-cache-friendly-image-proxy-in-laravel-inspired-by-cloudflare-9e95f7e0)
72-
- [Cloudflare Images](https://developers.cloudflare.com/images/transform-images/transform-via-url/) for the URL-Syntax structure
91+
- [Aaron Francis](https://github.com/aarondfrancis) for the [original idea and foundational work](https://aaronfrancis.com/2025/a-cookieless-cache-friendly-image-proxy-in-laravel-inspired-by-cloudflare-9e95f7e0)
92+
- [Cloudflare Images](https://developers.cloudflare.com/images/transform-images/transform-via-url/) for the URL-Syntax structure
93+
- [Intervention Image](https://image.intervention.io/v3) for the underlying image processing
7394

7495
## License
7596

0 commit comments

Comments
 (0)