EasyThumbnailImage.php
public static function thumbnailFileUrl($filename, $width, $height, $mode = self::THUMBNAIL_OUTBOUND,
                                            $quality = null, $checkRemFileMode = self::CHECK_REM_MODE_NONE)
    {
        $cacheUrl = Yii::getAlias('@web/' . static::$cacheAlias);
        $thumbnailFilePath = static::thumbnailFile($filename, $width, $height, $mode, $quality, $checkRemFileMode);

        \preg_match('#[^\\' . DIRECTORY_SEPARATOR . ']+$#', $thumbnailFilePath, $matches);
        $fileName = $matches[0];

        return $cacheUrl . '/' . \substr($fileName, 0, 2) . '/' . $fileName;
    }
public static function thumbnailFileUrl($filename, $width, $height, $mode = self::THUMBNAIL_OUTBOUND,
                                            $quality = null, $checkRemFileMode = self::CHECK_REM_MODE_NONE)
    {
        $cacheUrl = Yii::getAlias('@web/' . static::$cacheAlias);
        $thumbnailFilePath = static::thumbnailFile($filename, $width, $height, $mode, $quality, $checkRemFileMode);

        \preg_match('#[^\\' . DIRECTORY_SEPARATOR . ']+$#', $thumbnailFilePath, $matches);
        $fileName = $matches[0];

        return $cacheUrl . '/' . \substr($fileName, 0, 2) . '/' . $fileName;
    }
public static function thumbnailFileUrl ( $ filename , $ width , $ height , $ mode = self :: THUMBNAIL_OUTBOUND , $ quality = null , $ checkRemFileMode = self :: CHECK_REM_MODE_NONE ) { $ cacheUrl = Yii :: getAlias ( '@web/' . static :: $ cacheAlias ) ; $ thumbnailFilePath = static :: thumbnailFile ( $ filename , $ width , $ height , $ mode , $ quality , $ checkRemFileMode ) ; \ preg_match ( '#[^\\' . DIRECTORY_SEPARATOR . ']+$#' , $ thumbnailFilePath , $ matches ) ; $ fileName = $ matches [ 0 ] ; return $ cacheUrl . '/' . \ substr ( $ fileName , 0 , 2 ) . '/' . $ fileName ; }
Creates and caches the image thumbnail and returns URL from thumbnail file.

If one of thumbnail dimensions is set to `null`, another one is calculated automatically based on aspect ratio of
original image. Note that calculated thumbnail dimension may vary depending on the source image in this case.

If both dimensions are specified, resulting thumbnail would be exactly the width and height specified. How it's
achieved depends on the mode.

If `self::THUMBNAIL_OUTBOUND` mode is used, which is default, then the thumbnail is scaled so that
its smallest side equals the length of the corresponding side in the original image. Any excess outside of
the scaled thumbnail’s area will be cropped, and the returned thumbnail will have the exact width and height
specified.

If thumbnail mode is `self::THUMBNAIL_INSET`, the original image is scaled down so it is fully
contained within the thumbnail dimensions. The rest is filled with background that could be configured via
[[Image::$thumbnailBackgroundColor]] or [[EasyThumbnail::$thumbnailBackgroundColor]],
and [[Image::$thumbnailBackgroundAlpha]] or [[EasyThumbnail::$thumbnailBackgroundAlpha]].

If thumbnail mode is `self::THUMBNAIL_INSET_BOX`, the original image is scaled down so it is fully contained
within the thumbnail dimensions. The specified $width and $height (supplied via $size) will be considered
maximum limits. Unless the given dimensions are equal to the original image’s aspect ratio, one dimension in the
resulting thumbnail will be smaller than the given limit.

@param string $filename the image file path or path alias or URL
@param integer $width the width in pixels to create the thumbnail
@param integer $height the height in pixels to create the thumbnail
@param string $mode mode of resizing original image to use in case both width and height specified
@param integer $quality
@param integer $checkRemFileMode check file version on remote server
@return string
@throws FileNotFoundException
@throws InvalidConfigException
@throws \yii\httpclient\Exception
Creates and caches the image thumbnail and returns URL from thumbnail file .