Support » Plugins and Hacks » AMP » “The attribute image.width has an invalid value.”

  • mynamealreadyexists

    (@mynamealreadyexists)


    “The attribute image.width has an invalid value.” It’s because the image width IS incorrect. So is the height, BTW, because there is supposed to be quotes around the data part of the JSON data, {“height”:100,”width”:100} should be {“height”:”100″,”width”:”100″}. Was happy to see the default image thing get in there a couples days ago but you missed this part.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mohammad Jangda

    (@batmoo)


    {“height”:100,”width”:100} is perfectly valid JSON. The issue that Google’s structured data testing tool is likely complaining about it that the image doesn’t match their preferred dimensions.

    mynamealreadyexists

    (@mynamealreadyexists)


    It doesn’t matter that much if it’s “valid”, “not valid”, “sort of valid” or JSON salad. If done one way where the browsers plus Google approves and another way where less parts work together, what is the path to take until that equation changes? The testing tool and the “real deal” are likely to operate the same way. Same person probably copy and paste that code all over google. One day the boss will catch wind but, in the mean time….

    mynamealreadyexists

    (@mynamealreadyexists)


    "height":"0","width":"0" works
    "height":"0","width":0 does not work
    "height":0,"width":"0" works
    "height":0,"width":0 does not work

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.