Title: Error on image tag
Last modified: September 7, 2021

---

# Error on image tag

 *  [farnerud](https://wordpress.org/support/users/farnerud/)
 * (@farnerud)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/error-on-image-tag/)
 * Hi,
    I’m having multiple errors on the Google Console for AMP. One of them is:**
   _Tag found outside the document head which is only allowed as a direct child 
   of the document head._** I don’t know if this is caused by the lazyloading option
   on the image optimizer. Thanks for your help.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-on-image-tag%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [paulieweb](https://wordpress.org/support/users/paulieweb/)
 * (@paulieweb)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/error-on-image-tag/#post-14847769)
 * I’m getting a similar issue, in Google Search Console: “Disallowed attribute 
   or attribute value present in HTML tag.” When I investigate any given AMP page,
   I get an error as seen in [this image](https://dbventures.io/issue-210907.png).
   Basically it looks like for the amp-featured-image <figure>, both the ‘data-hero’
   and ‘fallback’ versions are removing the quotes ” from alt=”blah blah” to alt
   =blah blah, which means HTML is no longer valid.
 * But only affects the cached version of page, internal version is okay. So possibly
   an internal issue, just thought should mention in case. EDIT: just confirmed 
   rolling back from 1.0.77.22 to 1.0.7.20 fixes this issue.
    -  This reply was modified 4 years, 9 months ago by [paulieweb](https://wordpress.org/support/users/paulieweb/).
    -  This reply was modified 4 years, 9 months ago by [paulieweb](https://wordpress.org/support/users/paulieweb/).
 *  Plugin Author [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/error-on-image-tag/#post-14867482)
 * It seems there is issues with the below images.
    Reference screengrab: [https://prnt.sc/1s2qk4m](https://prnt.sc/1s2qk4m)
 * Can you please let us know, how you are adding those images?
 *  Plugin Author [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/error-on-image-tag/#post-14867486)
 * Paulieweb: As per forum guidelines, please create a new topic.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Error on image tag’ is closed to new replies.

 * ![](https://ps.w.org/accelerated-mobile-pages/assets/icon-256x256.png?rev=1693616)
 * [AMP for WP - Accelerated Mobile Pages](https://wordpress.org/plugins/accelerated-mobile-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accelerated-mobile-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accelerated-mobile-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * Last activity: [4 years, 9 months ago](https://wordpress.org/support/topic/error-on-image-tag/#post-14867486)
 * Status: not resolved