- Issue created by @dieterholvoet
- Status changed to Needs review
8 months ago 12:27pm 15 March 2024 - π³π±Netherlands seanB Netherlands
I think doing something like β¨ Alter hook to adjust image effect RTBC makes a bit more sense. It would reduce the complexity of this module and add more flexibility.
Do you think a hook would also give you what you need? - π§πͺBelgium dieterholvoet Brussels
I agree β¨ Alter hook to adjust image effect RTBC would be a useful improvement, but I still think it would be a good idea to add support to the main module. With 66k+ installs Image Widget Crop is an essential part of the Crop ecosystem: together with Focal Point itβs listed on the Crop project page β . Hardcoding Focal Point makes this module very opinionated. That doesn't have to be a bad thing, but if you decide to stick with only Focal Point I would document that better in the project description.
If youβre really against adding this to the main module, we could add it as a submodule or I could even create a completely separate project, but I think that would be a bit overkill. Iβd rather not keep this in custom code either since weβre talking about multiple parts: a form alter for the config form, schema for the config, an alter for the image effects. At our company we're planning to integrate this with all future and even some existing projects, so we'd like to keep any custom code to a minimum.
- π§πͺBelgium dieterholvoet Brussels
I fixed an issue where duplicate image effects were being added and I made the code a bit more readable.
- π³π±Netherlands seanB Netherlands
Now β¨ Alter hook to adjust image effect RTBC is in, we at least provide an official API to configure effects on the generated styles.
In an ideal world, we provide an interface like the image styles entity where you can add and configure effects you would like to apply to all generated styles (same as you would apply effects to normal image styles).
Not all effects make sense (like the ones for changing the width/height), but I guess all other effects would be nice. For example, the Image effects β module also provides lots of effects sites might want to add.
What do you think about this idea?
- π§πͺBelgium dieterholvoet Brussels
Yes, I agree! That would save us from a lot of custom code. We could work on that in a separate issue?
- π³π±Netherlands seanB Netherlands
That sounds good! We could also consider just rewriting this issue instead. Iβm not too keen on adding specific support for other crop modules as it's currently done in the MR, so maybe we can close this and either open a new one or simply revise this issue.
- π§πͺBelgium dieterholvoet Brussels
I created a new issue since we're using patches from this one in a lot of projects: β¨ Add a UI for a template image style on which generated image styles will be based Active . We'll close this one as 'Won't fix' once the new one is committed.