library/Haste/Image/Image.php
public static function getSizedImagePath($uuid, $size)
    {
        $container = \System::getContainer();
        $rootDir = $container->getParameter('kernel.project_dir');

        if (!($path = Files::getPathFromUuid($uuid))) {
            return false;
        }

        $size = unserialize($size);

        if (is_array($size))
        {
            if (count($size) < 3)
            {
                return false;
            }
            else
            {
                $size = $size[2];
            }
        }

        return $container->get('contao.image.image_factory')->create(
            $rootDir . '/' . $path, $size
        )->getUrl($rootDir);
    }
public static function getSizedImagePath($uuid, $size)
    {
        $container = \System::getContainer();
        $rootDir = $container->getParameter('kernel.project_dir');

        if (!($path = Files::getPathFromUuid($uuid))) {
            return false;
        }

        $size = unserialize($size);

        if (is_array($size))
        {
            if (count($size) < 3)
            {
                return false;
            }
            else
            {
                $size = $size[2];
            }
        }

        return $container->get('contao.image.image_factory')->create(
            $rootDir . '/' . $path, $size
        )->getUrl($rootDir);
    }
public static function getSizedImagePath ( $ uuid , $ size ) { $ container = \ System :: getContainer ( ) ; $ rootDir = $ container -> getParameter ( 'kernel.project_dir' ) ; if ( ! ( $ path = Files :: getPathFromUuid ( $ uuid ) ) ) { return false ; } $ size = unserialize ( $ size ) ; if ( is_array ( $ size ) ) { if ( count ( $ size ) < 3 ) { return false ; } else { $ size = $ size [ 2 ] ; } } return $ container -> get ( 'contao.image.image_factory' ) -> create ( $ rootDir . '/' . $ path , $ size ) -> getUrl ( $ rootDir ) ; }
Returns path of sized image.
@param $uuid mixed binary uuid
@param $size int|array
@return bool|string
Returns path of sized image .