Model/Picture.php
public function addImageStyles($path)
    {
        # Styles configured in bootstrap.php
        $sizes = Configure::read('GalleryOptions.Pictures.styles');

        $links = array();

        if (count($sizes)) {
            $root_url = WWW_ROOT;
            $relative_url = Router::url('/');

            # Current filename
            $filename = end(explode("/", $path));

            foreach ($sizes as $sizename => $size) {
                # Filename with size prefix. E.g: small-filename.jpg
                $modified = $sizename . "-" . $filename;
                # Get final path replacing absolute URl to application relative URL
                $final_path = str_replace($root_url, $relative_url, str_replace($filename, $modified, $path));
                # Add to array
                $links[$sizename] = $final_path;
            }
        }

        return $links;
    }
public function addImageStyles($path)
    {
        # Styles configured in bootstrap.php
        $sizes = Configure::read('GalleryOptions.Pictures.styles');

        $links = array();

        if (count($sizes)) {
            $root_url = WWW_ROOT;
            $relative_url = Router::url('/');

            # Current filename
            $filename = end(explode("/", $path));

            foreach ($sizes as $sizename => $size) {
                # Filename with size prefix. E.g: small-filename.jpg
                $modified = $sizename . "-" . $filename;
                # Get final path replacing absolute URl to application relative URL
                $final_path = str_replace($root_url, $relative_url, str_replace($filename, $modified, $path));
                # Add to array
                $links[$sizename] = $final_path;
            }
        }

        return $links;
    }
Add image styles configured in bootstrap.php

@param $path
@param array $sizes
@return array