Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lazy Load Blocks Shortcake Plugin Image Comparison #8785

Closed
mrjarbenne opened this issue Feb 8, 2018 · 2 comments · Fixed by #8787
Closed

Lazy Load Blocks Shortcake Plugin Image Comparison #8785

mrjarbenne opened this issue Feb 8, 2018 · 2 comments · Fixed by #8787
Labels
[Feature] Lazy Images [Type] Bug When a feature is broken and / or not performing as intended

Comments

@mrjarbenne
Copy link

When Lazy Load is activated, Shortcake Bakery (which includes an Image Comparison shortcode rendered through juxtapose.js) fails to render. I've reported the issue on that repo as well (wp-shortcake/shortcake-bakery#218), but solving this may require Lazy Load to filter additional elements, as was required for avatars previously:

Automattic/lazy-load@d6045f6

@zinigor zinigor added [Type] Bug When a feature is broken and / or not performing as intended [Feature] Lazy Images labels Feb 8, 2018
@zinigor
Copy link
Member

zinigor commented Feb 8, 2018

Thanks for reporting this, we'll take a look!
cc @ebinnion

@ebinnion
Copy link
Contributor

ebinnion commented Feb 8, 2018

Hello @mrjarbenne

I've added the ability to bypass processing lazy images that have a certain class in #8787. I've also added a couple of filters so that plugins/theme can add extra classes to skip and or skip based on a given image's attributes.

This won't fix the issue with Shortcode Bakery out of the box since I didn't see any classes or attributes that were specific to Shortcode Bakery in their code: https://github.com/wp-shortcake/shortcake-bakery/blob/eb99eec95bcfc323e113d92db1f5b44f52e34336/inc/shortcodes/class-image-comparison.php#L112-L129.

As a note, they do add data-label and data-credit but those seem generic enough that we may not want to filter out all images with those attributes present.

I'm curious what you think of this approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Lazy Images [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants