Frontend\Core\Engine\FrontendFormImage::generateThumbnails PHP Method

generateThumbnails() public method

- x128 as folder name to generate an image that where the width will be 128px, the height will be calculated based on the aspect ratio.
public generateThumbnails ( string $path, string $filename )
$path string
$filename string
    public function generateThumbnails($path, $filename)
    {
        // create folder if needed
        $filesystem = new Filesystem();
        if (!$filesystem->exists($path . '/source')) {
            $filesystem->mkdir($path . '/source');
        }
        // move the source file
        $this->moveFile($path . '/source/' . $filename);
        // generate the thumbnails
        Model::generateThumbnails($path, $path . '/source/' . $filename);
    }