Lazy Images: Skip images with data-skip-lazy attribute#14539
Conversation
|
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: February 11, 2020. |
9840d86 to
f4d0f59
Compare
|
I'd have 2 questions about this:
|
That's a good question. Yes, users and third-party developers could use that filter to exclude images based on an attribute. But, the purpose of adding this attribute is to standardize how users and third-party theme/developers can exclude images from being lazily loaded. Other plugins use some combination of the Of note, there's a core marketing push for this around this as well.
Yes sir. |
| } | ||
|
|
||
| /** | ||
| * @dataProvider get_dont_process_images_with_skip_lazy_data_attribute_data |
There was a problem hiding this comment.
TIL how to use @dataProvider! Thanks for adding the tests.
* 8.3 release: changelog * Changelog: add #14516 * Changelog: add #14574 * Bring in changes from 8.2.1 and 8.2.2 * Update stable version * Bring in 8.2.3 changes * Changelog: add #14714 * Changelog: add #14639 * Changelog: add #14678 * Changelog: add #14673 * Changelog: add #14687 * Changelog: add #14704 * Changelog: add #14702 * Changelog: add #14541 * Changelog: add #14657 * Changelog: add #14622 * Changelog: add #14582 * Changelog: add #14638 * Changelog: add #14633 * Changelog: add #14571 * Changelog: add #14592 * Changelog: add #14539 * Changelog: add #14514 * Changelog: add #14643 * Changelog: add #14494 * Changelog: add #13739 * Changelog: add #14707 * Changelog: add #14736 * Changelog: add #14706 * Changelog: add #14730 * Changelog: add #14685 * Changelog: add #14727 * Changelog: add #14711 * Changelog: add #14742 * Changelog: add #14746 * Changelog: add #14725 * Changelog: add #13999 * Changelog: add #14740 * Changelog: add #14759 * Changelog: add #14703 * Changelog: add #14753 * Changelog: add #14754 * Changelog: add #14645 * Cahngelog: add #14599
Per a request from a hosting partner and a community member, add the ability to skip lazy loading of images that have the
data-skip-lazyattribute.Changes proposed in this Pull Request:
data-skip-lazyattributeIs this a new feature or does it add/remove features to an existing part of Jetpack?
Testing instructions:
data-skip-lazy="1"jetpack-lazy-image--handledclass nor any other lazy attributes.For example, there are two images in the source here. The top on was not lazy loaded but the bottom one was.
Proposed changelog entry for your changes: