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
|`'bin'`| string |`__DIR__ . '/bin/colorist'`| Path to `colorist` executable |
70
+
|`'formats'`| array |`['webp']`| Default file formats to be used on image uploads |
71
+
|`'speed'`| integer |`0`| Quality/speed tradeoff when encoding (AVIF only); `0` = best quality, `10` = fastest |
72
+
|`'template'`| string |`'image'`| Set file blueprint for generated images |
73
+
|`'tonemap'`| string |`'off'`| Set tonemapping (`'on'` or `'off'`) |
74
+
|`'yuv'`| string |`'420'`| Choose yuv output format for supported formats (`'444'`, `'422'`, `'420'` or `'yv12'`) |
75
+
76
+
The `colorist` library has [much more](https://github.com/joedrago/colorist/blob/master/docs/Usage.md) to offer, and more options will be made available in time - if one of it's many features you really feel is missing, feel free to open a PR!
77
+
64
78
#### Methods
65
79
For now, the following methods are available:
66
80
@@ -79,25 +93,20 @@ Checks if `$file` has image of given `$format`, returns `bool`.
79
93
##### `isFormat (string $format)`
80
94
Checks if `$file` is image of given `$format`, returns `bool`.
81
95
82
-
#### Configuration
83
-
You may also change certain options from your `config.php` globally (`'fundevogel.colorist.optionName'`):
96
+
#### Hooks
97
+
On image upload, files are automatically converted to all formats in the `'fundevogel.colorist.formats'` option (`['webp']` by default).
|`'bin'`| string |`__DIR__ . '/bin/colorist'`| Path to `colorist` executable |
88
-
|`'formats'`| array |`['webp']`| Default file formats to be used on image uploads |
89
-
|`'speed'`| integer |`0`| Quality/speed tradeoff when encoding (AVIF only); `0` = best quality, `10` = fastest |
90
-
|`'template'`| string |`'image'`| Set file blueprint for generated images |
91
-
|`'tonemap'`| string |`'off'`| Set tonemapping (`'on'` or `'off'`) |
92
-
|`'yuv'`| string |`'420'`| Choose yuv output format for supported formats (`'444'`, `'422'`, `'420'` or `'yv12'`) |
99
+
#### Tag
100
+
The `(colorist: example.jpg)` tag supports converting / resizing right from the editor.
93
101
94
-
The `colorist` library has [much more](https://github.com/joedrago/colorist/blob/master/docs/Usage.md) to offer, and more options will be made available in time - if one of it's many features you really feel is missing, feel free to open a PR!
102
+
##### Options
103
+
WIP
95
104
96
105
97
106
## Roadmap
98
107
-[ ] Add tests
99
108
-[x]~~Add hooks for file upload/update~~
100
-
-[ ]Add tag for editor use
109
+
-[x]~~Add tag for editor use~~
101
110
-[x]~~Add compatibility with 'Focus' plugin by @flokosiol~~
0 commit comments