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
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!
Line 517 as of 4/30/14
Please login or Register to submit your answer