/**
* Create thumbnail images
*
* @param string $origin image content
* @param CommandInterface $command executable command
* @param null|string $code dimension code
* @param null|string $disk storage disk
* @param null|string $path saved path
* @param null|string $originId origin file id
* @return Image
*/
public function createThumbnails($origin, CommandInterface $command, $code = null, $disk = null, $path = null, $originId = null)
{
$thumbnailer = $this->makeThumbnailer();
$content = $thumbnailer->setOrigin($origin)->addCommand($command)->generate();
$file = $this->storage->create($content, $path ?: '', implode('_', [$command->getName(), $command->getDimension()->getWidth() . 'x' . $command->getDimension()->getHeight(), hash('sha1', $content)]), $disk, $originId);
return $this->make($file, ['type' => $command->getName(), 'code' => $code]);
}