Try this.
Edit file wp-content/plugins/wp-open-graph/output.class.php
Change from
protected function get_image_size_tags( $image_thumb_src ) {
$image_path = $image_thumb_src;
if ( true == empty( $image_thumb_src ) ) {
$post = get_queried_object();
//$image_thumb_src = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) );
//$image_path = get_option( 'wpog_options', 'image' );
if ( preg_match( '/<img [^>]+>/', $post->post_content, $match ) ) {
if ( preg_match( '/src=([\"\'])(.*?)\1/', $match[0], $source ) ) {
$image_path = trim( str_replace( "src=", "", $source[0] ), '\"\'' );
} else {
$image_path = '';
}
} else {
$image_path = NY_OG_Main_Admin::option( 'image' );
}
}
$size = getimagesize( $image_path );
return array( 'path' => $image_path, 'size' => $size );
}
to
protected function get_image_size_tags( $image_thumb_src ) {
$image_path = $image_thumb_src;
$post = get_queried_object();
//$image_thumb_src = wp_get_attachment_url( get_post_thumbnail_id( $post->ID ) );
//$image_path = get_option( 'wpog_options', 'image' );
if ( preg_match( '/<img [^>]+>/', $post->post_content, $match ) ) {
if ( preg_match( '/src=([\"\'])(.*?)\1/', $match[0], $source ) ) {
$image_path = trim( str_replace( "src=", "", $source[0] ), '\"\'' );
} else {
$image_path = '';
}
} else {
$image_path = NY_OG_Main_Admin::option( 'image' );
}
$size = getimagesize( $image_path );
return array( 'path' => $image_path, 'size' => $size );
}
Hello Rage_zi,
I had the same issue today and found the following solution
ERROR shown on my pages and posts
: getimagesize (): Filename cannot be empty in /xxx/xxxxxx/xxxxxx/wp-content/plugins/wp-open-graph/output.class.php on line 306
SOLUTION
1: Go to SETTINGS >> WP OPEN GRAPH
2: Make sure you have a link put in the three image fields. Also when adding links in the fields provided make sure to use http:// and not https:// or you will get another error like 403 access denied
All the best,
JohnO