public function resolveImage(ImagesContainerInterface $imagesContainer)
    {
        if (
            $imagesContainer instanceof PrincipalImageInterface &&
            $imagesContainer->getPrincipalImage() instanceof ImageInterface
        ) {
            return $imagesContainer->getPrincipalImage();
        }

        $firstImage = $imagesContainer
            ->getSortedImages()
            ->first();

        return ($firstImage instanceof ImageInterface)
            ? $firstImage
            : false;
    }