Jump to content

Change facebook shared image dimension


MFreeman

Recommended Posts

I changed the product image on product page to 600x600 and when i press share on facebook it shares the image 600x600 and i crops the image.

I want the product image on product page 600x600 but when i share on facebook 600x300

 

Thank you!

Link to comment
Share on other sites

In product page i use medium_default (600x600) for the product image and i created a new image size called "socialshare" and its 600x300

I use the module Social sharing that has facebook twiter, pinterest and google

Link to comment
Share on other sites

Hi, ive done what you said and its going somewhere now, but still not working

 

with <meta property="og:image" content="{$link->getImageLink($link_rewrite, $cover.id_image, socialshare)}" />

 

it creates a url like

 

website.com/32-1/tuyau-inox-simple-paroi-1m.jpg

 

but if i change to website.com/32-socialshare/tuyau-inox-simple-paroi-1m.jpg it works

 

What do i need to change in <meta> to make it work?

Link to comment
Share on other sites

Odd, I wonder if the plugin is not set to use that on its own in the sharing button config.

Might be this, socialsharing.php, line 202 on my version

'sharing_img' => addcslashes($this->context->link->getImageLink($product->link_rewrite, $image_cover_id), "'")

Try adding the type there

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...