protected function rewriteImagesPathForProduction($content)
    {
        $imagesSourcePath = $this->imagesSourcePath;
        $imagesTargetPath = $this->imagesTargetPath;

        return preg_replace_callback('/([\/]?)(' . str_replace('/', '\/', $imagesSourcePath) . ')/s', function ($matches) use ($imagesTargetPath) {return $matches[1].$imagesTargetPath;}, $content);
    }
protected function rewriteImagesPathForProduction($content)
    {
        $imagesSourcePath = $this->imagesSourcePath;
        $imagesTargetPath = $this->imagesTargetPath;

        return preg_replace_callback('/([\/]?)(' . str_replace('/', '\/', $imagesSourcePath) . ')/s', function ($matches) use ($imagesTargetPath) {return $matches[1].$imagesTargetPath;}, $content);
    }
protected function rewriteImagesPathForProduction ( $ content ) { $ imagesSourcePath = $ this -> imagesSourcePath ; $ imagesTargetPath = $ this -> imagesTargetPath ; return preg_replace_callback ( '/([\/]?)(' . str_replace ( '/' , '\/' , $ imagesSourcePath ) . ')/s' , function ( $ matches ) use ( $ imagesTargetPath ) { return $ matches [ 1 ] . $ imagesTargetPath ; } , $ content ) ; }
Rewrites the images to be correctly displayed in the production environment

@param  string $content
@return string
Rewrites the images to be correctly displayed in the production environment