src/EventListener/ImageStorageListener.php
/**
     * Removing old cached image and the real one, from both uploads directories.
     */
Removing old cached image and the real one, from both uploads directories.
Removing old cached image and the real one from both uploads directories .
public function preRemove(LifecycleEventArgs $args): void
    {
        $entity = $args->getEntity();
        if (!$entity instanceof Image) {
            return;
        }
        $this->imageManager->cacheRemove($entity, self::TARGETED_FILTERS);
        $this->imageManager->remove($entity);
    }
public function preRemove ( LifecycleEventArgs $ args ) : void { $ entity = $ args -> getEntity ( ) ; if ( ! $ entity instanceof Image ) { return ; } $ this -> imageManager -> cacheRemove ( $ entity , self :: TARGETED_FILTERS ) ; $ this -> imageManager -> remove ( $ entity ) ; }
Removing old cached image and the real one, from both uploads directories.
Removing old cached image and the real one from both uploads directories .