Javier Velez
asked 10 years ago

Right now, the code in functions.php is pulling a 110×110 thumbnail image for my open graph image data. How do I change that so that it grabs a larger image, or the original uploaded image instead? When you share a link on Facebook right now, it only shows is a small squared thumbnail, instead of the big, horizontal image.

1 Answers
Kido D
answered 10 years ago

Hi Javier,
To resolve the issue, please open up the functions.php file in theme folder, find the code below (around line 489):

$thumb = wp_get_attachment_thumb_url( $thumb_id );
echo '<meta property="og:image" content="'.$thumb.'" />';

and change it into this:

$thumb = wp_get_attachment_image_src( $thumb_id, 'full' );
echo '<meta property="og:image" content="'.$thumb[0].'" />';

P/S.:  in case you don’t see the lager image on Facebook yet, please clean the cache of your browser, or open another browser to see the change.
Hope that helps!

Dan Black
replied 10 years ago

Line 517 as of 4/30/14

Powered by DW Question & Answer Pro