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;
    }