Closed tobimori closed 1 year ago
I like that. Quick question. Doesn't the following work as well (untested)?
(new \Kirby\Image\Image('assets/images/logo.png))->placeholderUri();
Nope, it doesn't. It seems like File methods are only applied to Cms File classes, not Filesystem classes.
Block error: "Call to undefined method Kirby\Image\Image::placeholderUri()" in block type: "complex-list"
Since we're all in the PHP 8 game, we were able to add the \Kirby\Filesystem\Asset
type without relying on mixed.
Fixed in https://github.com/johannschopplich/kirby-blurry-placeholder/commit/184ce5290d9db9749b362d1b04ae571accc258d6 and released in v3.0.1.
Thanks for the input!
I just figured out how to use this plugin with static files supplied with your Kirby "theme" and maybe we can find a way to extend the Class with methods and implement this into the plugin?
Use the asset helper to get a
Kirby\Filesystem\Asset
Object:Then get the
placeholderUri
manually:You will also need to switch the accepted parameter type in
classes/KirbyExtended/BlurryPlaceholder
tomixed
.