Change size of og:image:width and height
-
Hello,
How to update og:image:width and og:image:height meta?
I use follow code to update image url
/** * Update wpseo_opengraph_image url with profile image on profile page */ function intervik_wpseo_opengraph_image($image) { if(is_page('profile')) { $username = get_query_var( 'username' ); // get the username from the query var if(empty($username)) { $user = wp_get_current_user(); } else { $user = get_user_by('login', $username); } $avatar = get_avatar_url($user->ID, array('size' => '512')); $image = $avatar; } return $image; } add_filter('wpseo_opengraph_image', 'intervik_wpseo_opengraph_image', 10, 1);
But the image size seems to not be updated, is there any way to change it, did there are any filters like as wpseo_opengraph_image?
Thanks you!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Change size of og:image:width and height’ is closed to new replies.