Closed Daandelange closed 1 year ago
Two issues for the implementation, which make them more difficult to maintain.
system.loadPlugins:after
plugin hook and calling $kirby->extend(['options'=>'thumbs.presets.ogimage'=>[...]], null)
.format
), and I can't think of a workaround to make a preset dynamic or to override a preset.@Daandelange No need for that, there’s already an API for overriding the deafult og:image
of a page. I just added it to the docs: https://github.com/fabianmichael/kirby-meta#providing-metadata-from-page-models
Awesome, thanks ! :)
Hello (again),
[sorry for posting quite some issues, I'm implementing your plugin and thinkering at the same time :) ]
Context:
I'm using a custom thumb driver to customise how thumbs are generated generally and would like to use it to customise the OG image thumb too. Long story short, this is way more easy and robust using thumb presets when calling
$file->thumb()
(otherwise requiring to check the thumb settings argument against known preset values).Motivation:
Be it with or without custom thumb driver, I think there are situations where one wishes customise the thumb function used by this plugin, and it would be possible if it registers and uses a thumb preset rather then hardcoded thumb parameters. (example: change the thumb quality for the og-image). This will also make it easier to generate an og-image-thumb manually from usercode by providing a specific preset.
Sure, this is already possible with the hooks by removing the corresponding thumb tags and generating a thumb again to put it back as a html tag, but that feels heavy.
Proposal:
So I'm asking to make the OG image thumb easier to customise/hook-up by switching from hardcoded thumb parameters to a thumb preset.
thumb()