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.

Command icon 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:

Comments

mably created an issue. See original summary.

mably’s picture

Issue summary: View changes
mably’s picture

Issue summary: View changes

chetan 11 made their first commit to this issue’s fork.

chetan 11’s picture

Status: Active » Needs review

Hi,
I have fixed the above error in my local setup, please check the raised MR.
Thanks.

mably’s picture

Looks like some ChatGPT generated code that doesn't work.

sad270’s picture

Hello,
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 FileInsertHookHandler in imageapi_optimize, it will be more appropriate to implement the feature in imageapi_optimize directly. Like this you will need only one module. Disabling the image style handling in this module to only use the FileInsertHookHandler for 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.json

curriedn’s picture

Status: Needs review » Closed (works as designed)
Issue tags: +DevDaysBurgas2024

Since both modules are supposed to do the same thing and there is no answer on last comment, I'm closing this issue too.