Problem/Motivation
When both Images Optimizer and Optimize Image modules are activated, accessing Image Styles configuration causes a WSOD.
Steps to reproduce
Activate both Images Optimizer and Optimize Image modules and go to /admin/config/media/image-styles
Proposed resolution
It looks like the two modules are not compatible and shouldn't be used together.
But at least imagepapi_optimize should check that ImageStyle entities are of the right type before acting on them, I will create an issue there.
Could images_optimizer allow to disable the handling of image styles so both modules could be used together without conflict? Will create a specific issue for that.
We are still interested in using the FileInsertHookHandler that imageapi_optimize doesn't seem to provide.
Issue fork images_optimizer-3405286
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3405286-call-to-undefined
changes, plain diff MR !3
Comments
Comment #2
mably commentedComment #3
mably commentedComment #6
chetan 11 commentedHi,
I have fixed the above error in my local setup, please check the raised MR.
Thanks.
Comment #7
mably commentedLooks like some ChatGPT generated code that doesn't work.
Comment #9
sad270 commentedHello,
Why do you need to have both of these modules installed? By design, their purpose is the same, and so they should not be used conjointly.
If the need is to use
FileInsertHookHandlerinimageapi_optimize, it will be more appropriate to implement the feature inimageapi_optimizedirectly. Like this you will need only one module. Disabling the image style handling in this module to only use theFileInsertHookHandlerfor another module simply diverge from this module's reason to be: keep it simple in an opinionated way.To avoid any future confusion, we will add an explicit conflict in our
composer.jsonComment #10
curriedn commentedSince both modules are supposed to do the same thing and there is no answer on last comment, I'm closing this issue too.