Skip to content

Commit 35d7c98

Browse files
committed
docs: update usage instructions
1 parent 366e400 commit 35d7c98

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,24 @@ Publish the config file with:
3838
php artisan vendor:publish --tag="image-transform-url-config"
3939
```
4040

41-
## Usage
41+
## Getting Started
4242

43-
1. Configure the package via `image-transform-url.php` to set your [`public_path`](https://laravel.com/docs/12.x/helpers#method-public-path) directory, from where you want to transform the images.
44-
It is recommended to use a dedicated directory for your images in order to have a separation of concerns.
43+
1. Configure the package via `image-transform-url.php` to set your `source_directories`, from where you want to transform the images. By default, the package will look for `images` directories in your `public` folder and in the `storage/app/public` directory.
44+
It is recommended to use a dedicated subdirectory for your images in order to avoid conflicts with other files.
4545

46-
2. Test your first image transformation:
46+
2. Choose a default source directory by setting the `default_source_directory` option in the `image-transform-url.php` configuration file. This will be used if no source directory is specified in the URL.
47+
48+
3. Test your first image transformation:
4749

4850
Use the following URL format to transform your images:
4951

5052
```
51-
http://<domain>/<route-prefix>/<options>/<path-to-your-image.<jpg|jpeg|png|gif|webp>>
53+
http://<domain>/<route-prefix>/<source-directory>/<options>/<path-to-your-image.<jpg|jpeg|png|gif|webp>>
5254
```
5355

56+
>[!NOTE]
57+
> You can omit the `<source-directory>` part if you have set a default source directory in the configuration file.
58+
5459
for example:
5560

5661
```

0 commit comments

Comments
 (0)