File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -100,6 +100,20 @@ each other. This allows smoother animations between the blurry unloaded and the
100100</div >
101101```
102102
103+ ## Hooks
104+
105+ You can hook into the placeholder generation process to modify the generated placeholder data URIs.
106+ The example below will prevent placeholder output for possibly transparent image types.
107+
108+ ``` php
109+ wire()->addHookAfter('ImagePlaceholders::getPlaceholderDataUri', function (HookEvent $e) {
110+ $image = $e->arguments('image');
111+ if ($image->ext === 'png' || $image->ext === 'gif') {
112+ $e->return = '';
113+ }
114+ });
115+ ```
116+
103117## Support
104118
105119Please [ open an issue] ( https://github.com/daun/processwire-image-placeholders/issues/new ) for support.
You can’t perform that action at this time.
0 commit comments