public function optimize(string $pathToImage, string $pathToOutput = null)
    {
        if(config('media.optimize_image')) {
            ImageOptimizer::optimize($pathToImage, $pathToOutput);
        }
        return $this;
    }