/** * Resolve a path using the default core path resolver. * Avoid using this method when you have access to your a resolver instance. * * @param $type * @return null|string */ public function getThumbnailURL($type) { if (!$type instanceof ThumbnailTypeVersion) { $type = ThumbnailTypeVersion::getByHandle($type); } /** @var Resolver $path_resolver */ $path_resolver = Core::make('Concrete\\Core\\File\\Image\\Thumbnail\\Path\\Resolver'); if ($path = $path_resolver->getPath($this, $type)) { return $path; } return $this->getURL(); }
public function getThumbnailURL($type) { if (!$type instanceof ThumbnailTypeVersion) { $type = ThumbnailTypeVersion::getByHandle($type); } $fsl = $this->getFile()->getFileStorageLocationObject(); if ($fsl && $type) { $configuration = $fsl->getConfigurationObject(); $fss = $fsl->getFileSystemObject(); $path = $type->getFilePath($this); if ($fss->has($path)) { return $configuration->getPublicURLToFile($path); } } return $this->getURL(); }