Sonata\ProductBundle\Seo\Services\Facebook::addImageInfo PHP Method

addImageInfo() protected method

protected addImageInfo ( Sonata\MediaBundle\Model\MediaInterface $image, Sonata\SeoBundle\Seo\SeoPageInterface $seoPage )
$image Sonata\MediaBundle\Model\MediaInterface
$seoPage Sonata\SeoBundle\Seo\SeoPageInterface
    protected function addImageInfo(MediaInterface $image, SeoPageInterface $seoPage)
    {
        $provider = $this->mediaPool->getProvider($image->getProviderName());
        $seoPage->addMeta('property', 'og:image', $provider->generatePublicUrl($image, $this->mediaFormat))->addMeta('property', 'og:image:width', $image->getWidth())->addMeta('property', 'og:image:height', $image->getHeight())->addMeta('property', 'og:image:type', $image->getContentType());
    }