Support » Plugin: Lazy Load Optimizer » schema error

  • Hi,
    i am using lazy-load-optimizer plugin
    and it is great

    i got an error from google console
    that my schema is broken

    i checked the problem,
    and it’s because i have something that looks like this –
    <script type=”application/ld+json”>{“@context”:”https:\/\/schema.org\/”,”@type”:”Product”, …
    <img class=”lazyload” …

    because this is inside JSON
    all the ” should be with a prefix of \
    so it’s should be
    <img class=/”lazyload/” …

    it’s because your plugin saw img tag, insert class=”lazyload” for the image
    but you didn’t check that you are inside a JSON field.

    i did a temporary workaround using real time find and replace
    and i change
    <img class=”lazyload” class=\”alignnone
    to
    <img class=\”lazyload alignnone

    i changed
    \” src=”data:image
    to
    \” src=\”data:image

    and so on

    Thanks,
    Shay

  • You must be logged in to reply to this topic.