public function writeTo($filename)
    {
        parent::writeTo($filename);
        
        if ($this->optimiserService instanceof ImageOptimiserInterface) {
            $this->optimiserService->optimiseImage($filename);
        }
    }