Model/Picture.php
public function createExtraImages($styles, $filename, $tmp_name, $album_id, $main_id, $image_name)
    {
        $ext = pathinfo($filename, PATHINFO_EXTENSION);

        if (count($styles)) {
            foreach ($styles as $style_name => $style) {
                $width = $style[0];
                $height = $style[1];
                $crop = $style[2] ? "crop" : "";

                # eg: medium-1982318927313.jpg
                $custom_filename = $style_name . '-' . $image_name . '.' . $ext;

                $path = $this->generateFilePath($album_id, $custom_filename);

                try {
                    $this->uploadFile(
                        $path,
                        $album_id,
                        $style_name . '-' . $filename,
                        $tmp_name,
                        $width,
                        $height,
                        $crop,
                        true,
                        $main_id,
                        $style_name
                    );
                } catch (ForbiddenException $e) {
                    throw new ForbiddenException($e->getMessage());
                }
            }
        }
    }
public function createExtraImages($styles, $filename, $tmp_name, $album_id, $main_id, $image_name)
    {
        $ext = pathinfo($filename, PATHINFO_EXTENSION);

        if (count($styles)) {
            foreach ($styles as $style_name => $style) {
                $width = $style[0];
                $height = $style[1];
                $crop = $style[2] ? "crop" : "";

                # eg: medium-1982318927313.jpg
                $custom_filename = $style_name . '-' . $image_name . '.' . $ext;

                $path = $this->generateFilePath($album_id, $custom_filename);

                try {
                    $this->uploadFile(
                        $path,
                        $album_id,
                        $style_name . '-' . $filename,
                        $tmp_name,
                        $width,
                        $height,
                        $crop,
                        true,
                        $main_id,
                        $style_name
                    );
                } catch (ForbiddenException $e) {
                    throw new ForbiddenException($e->getMessage());
                }
            }
        }
    }
Create extra images from a original one bases on
styles defined on bootstrap.php

@param $styles
@param $filename
@param $filesize
@param $tmp_name
@param $album_id
@param $main_id
@param $image_name
@throws ForbiddenException