Default WordPress galleries img tags close like <img>
which is invalid XHTML. The lazyload XT plugin that I'm using targets valid XHTML img tags which means ending should be:
<img src="http://www.acaciafotografia.com/wp-content/themes/jamdxstarter/img/tri.jpg"/>
instead of
<img src="http://www.acaciafotografia.com/wp-content/themes/jamdxstarter/img/tri.jpg">
How can I filter or modify this so lazyload works correctly?
Issue explained by author of wp lazyload XT integration.
The theme I'm using, UNDERSCORES, modifies the markup of WP galleries to make it HTML5 compliant. This doesn't work well with Lazyload XT , that fetches XHTML img tags that end with "/>" , while HTML5 img tags don't need this and close with ">"
In functions.php
I commented out the following line:
/*
* Switch default core markup for search form, comment form, and comments
* to output valid HTML5.
*/
add_theme_support( 'html5', array(
'search-form',
'comment-form',
'comment-list',
// 'gallery',
'caption',
) );