artesaos / seotools

SEO Tools for Laravel
MIT License
3.04k stars 503 forks source link

Override Open Graph Default Image #98

Open ewistrand opened 6 years ago

ewistrand commented 6 years ago

First thanks for your hard work on this! Is it possible to override the default open graph image? With twitter we can set the card image with setImage() in the controller but with open graph we can only use addImage() which does not override the default open graph image. Facebook is pulling the first it sees, which is the default.

senter-logistics commented 3 years ago

For facebook, i had to comment all my images as below, cuz nothing worked, but with just one, it'll take that.

 OpenGraph::addImage($logo);
//OpenGraph::addImage(['url' => $logo, 'size' => 300]);
//OpenGraph::addImage($logo, ['height' => 300, 'width' => 300]);
//OpenGraph::addImage($logo, ['height' => 600, 'width' => 600]);