public function getUriForThumbnail(ImageInterface $thumbnail)
{
$resource = $thumbnail->getResource();
if ($resource) {
return $this->resourceManager->getPublicPersistentResourceUri($resource);
}
$staticResource = $thumbnail->getStaticResource();
if ($staticResource === null) {
throw new ThumbnailServiceException(sprintf('Could not generate URI for static thumbnail "%s".', $this->persistenceManager->getIdentifierByObject($thumbnail)), 1450178437);
}
return $this->resourceManager->getPublicPackageResourceUriByPath($staticResource);
}