Skip to content

Added doc for ConfigureImageOptimizersEvent - #3073

Merged
mnocon merged 6 commits into
4.6from
image-editor-event
Mar 9, 2026
Merged

mnocon merged 6 commits into
4.6from
image-editor-event

Conversation

@mnocon

@mnocon mnocon commented Mar 5, 2026 •

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Mar 5, 2026

Copy link
Copy Markdown

Preview of modified files

Preview of modified Markdown:


| Event | Dispatched by | Properties |
|---|---|---|
|`ConfigureImageOptimizersEvent`|`SpatieChainOptimizer::optimize()`|`array<Spatie\ImageOptimizer\Optimizer> $optimizers`|

This comment was marked as resolved.

@mnocon
mnocon marked this pull request as ready for review March 5, 2026 15:24
@mnocon
mnocon requested a review from a team March 5, 2026 15:26
@ibexa-workflow-automation-1
ibexa-workflow-automation-1 Bot requested review from adriendupuis, dabrt and julitafalcondusza and removed request for a team March 5, 2026 15:26
@mnocon
mnocon force-pushed the image-editor-event branch from 8621bf5 to 5a78f52 Compare March 6, 2026 08:09
@github-actions

github-actions Bot commented Mar 9, 2026

Copy link
Copy Markdown

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/back_office/images/src/Event/RemovePngquantOptimizer.php


code_samples/back_office/images/src/Event/RemovePngquantOptimizer.php

docs/content_management/images/images.md@264:``` php
docs/content_management/images/images.md@265:[[= include_file('code_samples/back_office/images/src/Event/RemovePngquantOptimizer.php') =]]
docs/content_management/images/images.md@266:```

001⫶<?php declare(strict_types=1);
002⫶
003⫶namespace App\Event;
004⫶
005⫶use Ibexa\Contracts\ImageEditor\Event\ConfigureImageOptimizersEvent;
006⫶use Spatie\ImageOptimizer\Optimizers\Pngquant;
007⫶use Symfony\Component\EventDispatcher\EventSubscriberInterface;
008⫶
009⫶class RemovePngquantOptimizer implements EventSubscriberInterface
010⫶{
011⫶ public static function getSubscribedEvents(): array
012⫶ {
013⫶ return [
014⫶ ConfigureImageOptimizersEvent::class => 'onConfigureOptimizers',
015⫶ ];
016⫶ }
017⫶
018⫶ public function onConfigureOptimizers(ConfigureImageOptimizersEvent $event): void
019⫶ {
020⫶ $event->removeOptimizer(Pngquant::class);
021⫶ }
022⫶}

Download colorized diff

@sonarqubecloud

sonarqubecloud Bot commented Mar 9, 2026

Copy link
Copy Markdown

@mnocon
mnocon merged commit 3f94d23 into 4.6 Mar 9, 2026
9 checks passed
@mnocon
mnocon deleted the image-editor-event branch March 9, 2026 10:45
mnocon added a commit that referenced this pull request Mar 9, 2026
* Added doc for ConfigureImageOptimizersEvent

* Wording

* Fixed link

* Added PHP API link

* Fixed table formatting

* More formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants