src/Utility/FileUpload.php
public function getThumbnail(FileStorage $entity, string $version) : string
    {
        $versions = (array)Configure::read('FileStorage.imageHashes.file_storage');
        if (empty($versions)) {
            return str_replace(DS, '/', $entity->get('path'));
        }

        if (! array_key_exists($version, $versions)) {
            return str_replace(DS, '/', $entity->get('path'));
        }

        $path = in_array(strtolower($entity->get('extension')), self::IMAGE_EXTENSIONS) ?
            $this->getImagePath($entity, $version) :
            $this->getIconPath($entity, $version);

        return str_replace(DS, '/', $path);
    }
public function getThumbnail(FileStorage $entity, string $version) : string
    {
        $versions = (array)Configure::read('FileStorage.imageHashes.file_storage');
        if (empty($versions)) {
            return str_replace(DS, '/', $entity->get('path'));
        }

        if (! array_key_exists($version, $versions)) {
            return str_replace(DS, '/', $entity->get('path'));
        }

        $path = in_array(strtolower($entity->get('extension')), self::IMAGE_EXTENSIONS) ?
            $this->getImagePath($entity, $version) :
            $this->getIconPath($entity, $version);

        return str_replace(DS, '/', $path);
    }
public function getThumbnail ( FileStorage $ entity , string $ version ) : string { $ versions = ( array ) Configure :: read ( 'FileStorage.imageHashes.file_storage' ) ; if ( empty ( $ versions ) ) { return str_replace ( DS , '/' , $ entity -> get ( 'path' ) ) ; } if ( ! array_key_exists ( $ version , $ versions ) ) { return str_replace ( DS , '/' , $ entity -> get ( 'path' ) ) ; } $ path = in_array ( strtolower ( $ entity -> get ( 'extension' ) ) , self :: IMAGE_EXTENSIONS ) ? $ this -> getImagePath ( $ entity , $ version ) : $ this -> getIconPath ( $ entity , $ version ) ; return str_replace ( DS , '/' , $ path ) ; }
File storage entity thumbnail url getter by version.

@param \Burzum\FileStorage\Model\Entity\FileStorage $entity FileStorage entity
@param string $version Version name
@return string
File storage entity thumbnail url getter by version .