Hi @uzip ,
hope you’re fine. Sorry for the issue you’re facing. I think the problem come from the lazy loading of your image.
Can you try this filter :
<?php
add_filter( 'weglot_get_dom_checkers', 'custom_uzip_dom_check' );
function custom_uzip_dom_check( $dom_checkers ) { //$dom_checkers contains the list of all the class we are checking by default
class Img_Orig_File extends Weglot\Parser\Check\Dom\AbstractDomChecker {
const DOM = 'img';
const PROPERTY = 'data-orig-file';
const WORD_TYPE = Weglot\Client\Api\Enum\WordType::TEXT;
}
class Img_Medium_File extends Weglot\Parser\Check\Dom\AbstractDomChecker {
const DOM = 'img';
const PROPERTY = 'data-medium-file';
const WORD_TYPE = Weglot\Client\Api\Enum\WordType::TEXT;
}
class Img_Large_File extends Weglot\Parser\Check\Dom\AbstractDomChecker {
const DOM = 'img';
const PROPERTY = 'data-large-file';
const WORD_TYPE = Weglot\Client\Api\Enum\WordType::TEXT;
}
class Img_Lazy_Srcset extends Weglot\Parser\Check\Dom\AbstractDomChecker {
const DOM = 'img';
const PROPERTY = 'data-lazy-srcset';
const WORD_TYPE = Weglot\Client\Api\Enum\WordType::TEXT;
}
$dom_checkers[] = '\Img_Lazy_Srcset';
$dom_checkers[] = '\Img_Large_File';
$dom_checkers[] = '\Img_Orig_File';
$dom_checkers[] = '\Img_Medium_File';
return $dom_checkers ;
}
you can try this snippet on local or on a dev env before add it to your production site and tell me if it works?
Don’t hesitate if you have other questions
Regards