Skip to content

Commit abdd1eb

Browse files
committed
Update readme
1 parent 05f8805 commit abdd1eb

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,18 @@ Default value is `true` for lossy and `false` for lossless.
8282

8383
## Methods
8484

85-
There's 3 different methods you can use: cjxl binary, ImageMagick extension and Vips extension. The library goes through each of the available methods and tries to use them. If none of the methods are available, an exception will be thrown.
85+
There are four different methods you can use: cjxl binary, cjxl system binary, ImageMagick extension and Vips extension. The library goes through each of the available methods and tries to use them. If none of the methods are available, an exception will be thrown.
8686

8787
### Cjxl binary
8888

8989
This method executes the `cjxl` binary on the command line. It's the most compatible method and it supports the most features. However, the `proc_open` function needs to be enabled in the PHP installation since the library executes the binary on the command line. Some web hosts may disable this function for security reasons.
9090

9191
Note: this library comes bundled with statically compiled version of the `cjxl` binary for Linux, macOS and Windows systems. The binary is bundled with all the required libraries which means it will work out of the box without the need to install any additional dependencies.
9292

93+
### Cjxl system binary
94+
95+
This is the same as the previous method but it executes the `cjxl` binary from system PATH. This means you need to install jpeg xl using your system package manager like homebrew or build jpeg xl from source and add the `cjxl` binary to your PATH variable.
96+
9397
### ImageMagick extension
9498

9599
This method uses the ImageMagick library and its PHP extension Imagick. However, ImageMagick needs to be built with JXL delegate. In practice, this means you will need to install the libjxl library on the server. Then you will need to build ImageMagick from the source with the option `--with-jxl=yes`. Lastly, you will need to install the Imagick PHP extension. The ImageMagick extension does not support progressive encoding at the time. For an example how to compile ImageMagick with JPEG XL support, see [this Dockerfile](https://github.com/joppuyo/jpeg-xl-encode/blob/main/imagemagick.Dockerfile).

0 commit comments

Comments
 (0)