Juergen Posted January 28, 2018 Share Posted January 28, 2018 (edited) Hello, it would be great if some more settings will be added to getConfigAllowContext for the image field that can be used in template context via a Hook. This type of hook cannot be used to change fe. minWidth: $wire->addHookMethod('FieldtypeImage::getConfigAllowContext', function (HookEvent $e) { $allowables = ['minWidth', 'minHeight', 'noLang', 'clientQuality']; $e->return = array_merge($e->return, $allowables); }); In my case I would need the minWidth setting to be configurable in the image field in template context. I need a very large width for my slider images and a medium width for my article images. So slider images must be at least 1600px in width and article images at least 800px in width. For now I have to use advanced settings at image fields to achive this, but it would be great if this could be achived via a hook too, but it seems that this is not possible for the moment. Some other settings that could be useful are 'minWidth', 'minHeight', 'noLang', 'clientQuality'. Thanks Advanced settings by changing "$config->advanced = true;" works great in this case, so no need for adjustments. Edited January 28, 2018 by Juergen writing mistake Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now