Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 67836

A solution for this error: “The attribute image.width has an invalid value.”

$
0
0

Replies: 0

Hi,

I propose a solution for this error: “The attribute image.width has an invalid value.”

In « yasr-functions.php », just add: = ‘100%’,

For example:

`$rich_snippet[“image”] = array(
“@type” => “ImageObject”,
“url” => $post_image_url,
“width” => $post_image_size[0] = ‘100%’,
“height” => $post_image_size[1] = ‘100%’,`

Instead of :

`$rich_snippet[“image”] = array(
“@type” => “ImageObject”,
“url” => $post_image_url,
“width” => $post_image_size[0],
“height” => $post_image_size[1]`

Best Regards


Viewing all articles
Browse latest Browse all 67836

Trending Articles