- 🇩🇪Germany IT-Cru Munich
I think currently I only would remove this
$image->isValid()
to not get this previously fixed bug back again #3183535: Force Image Style Warmer to Exclude File Media Type → .Maybe I'm wrong but currently it seems that Drupal core's ImageStyle::createDerivative doesn't any checks for ImageToolks getSupportedExtensions().
- 🇮🇹Italy gambry Milan
Swapping with the right tag: ContributionWeekend2023.
- 🇮🇹Italy gambry Milan
(leaving the original one though. Plz remove it if not needed for internal use)
- 🇩🇪Germany IT-Cru Munich
@DieterHolvoet Could you please test my attached patch for your use case and give me some feedback.
Problem is, that it is currently possible to get all types of files from used hooks, drush commands, action plugins or custom code into the ImageStylesWarmer service and this $image->isValid() check was added to avoid ISW from adding all this non-image files into initial image styles pre-generation processing and queuing them as non-processable queue items.
Some more questions from me:
- Which PHP version you are running?
- What image toolkit you are using in your setup(s)?
- How many initial image styles to you have configured?
- How many queue image styles to you have configured?
- 🇩🇪Germany IT-Cru Munich
@DieterHolvoet you could also try out patch from ✨ Improve responsiveness by processing initial styles in a service destructor Fixed which includes changes from my patch from #9 and some other performance improvement.
- 🇧🇪Belgium dieterholvoet Brussels
Makes sense to only remove
$image->isValid()
and not the extensions check. I feel like the extensions should be checked in$image->isValid()
, smells like a core bug. @IT-Cru I added your changes to the MR and did some more changes myself. - 🇧🇪Belgium dieterholvoet Brussels
✨ Improve responsiveness by processing initial styles in a service destructor Fixed looks like a good improvement, but less relevant to my use case. For me it was about processing all existing images at once on an existing site, through Drush.
- 🇧🇪Belgium dieterholvoet Brussels
Which PHP version you are running?
8.0
What image toolkit you are using in your setup(s)?
ImageMagick
How many initial image styles to you have configured?
None.
How many queue image styles to you have configured?
All of them, 107.
- 🇧🇪Belgium dieterholvoet Brussels
Tested the current state of the MR, works as it should.
- last update
over 1 year ago 12 pass - last update
over 1 year ago 12 pass - last update
over 1 year ago 12 pass - last update
over 1 year ago 12 pass -
IT-Cru →
committed 2024ccef on 8.x-1.x authored by
DieterHolvoet →
Issue #3330175 by DieterHolvoet, IT-Cru: Remove duplicate image...
-
IT-Cru →
committed 2024ccef on 8.x-1.x authored by
DieterHolvoet →
- Status changed to Fixed
over 1 year ago 7:15pm 3 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.