Categories
Uncategorized

Test duplication

Example of default behavior when <picture> tags are used in HTML before Imagify swaps <img> tags out. We end up with nested <picture> tags.

Example of adding class of “itoi-skip-picture” to an <img> tag to prevent nested <picture> tags.

Example of adding attribute of data-itoi-skip-picture=”yes” to an <img> tag to prevent nested <picture> tags.

Example to show this can be used for <img> not nested inside <picture> as well for cases where there may be a layout or lazyload issue. This would allow the <picture> tags option to still be enabled if it works in some cases for users and some cases not.

Example to show <img> tags without either the class or attribute applied to skip replacement and that are not already nested inside a <picture> tags will still be swapped out for <picture> tags with this helper enabled.