public function getHashMaybeUpload(AbstractLocalImage $image)
    {
        if ($hash = $image->getRokkaHash()) {
            return $hash;
        }
        if (!$hash = $this->callbacks->getHash($image)) {
            if (!$this->isImage($image)) {
                return null;
            }
            $sourceImage = $this->imageUpload($image);
            if (null !== $sourceImage) {
                $hash = $this->callbacks->saveHash($image, $sourceImage);
            }
        }

        return $hash;
    }