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 Images: Fix issue introduced in #10054 where some images were double processed #10078

Merged
merged 2 commits into from
Sep 1, 2018

Conversation

ebinnion
Copy link
Contributor

@ebinnion ebinnion commented Aug 30, 2018

Changes proposed in this Pull Request:

In #10054, I introduced a bug that can occur when an image is processed multiple times. The condition that we had in process_image() to keep us from double processing an image was... messed up. 😞

First, it was checking in the processed attributes, instead of the attributes for the image that we are about to process.

Second, the logic was backwards. We wanted to bail if we detected the presence of a class, but that condition was bailing if we did not detect the presence of the class.

Testing instructions:

This became apparent to me when testing against a site with the Storefront theme and WooCommerce. Specifically, blank space was showing where images should be on the shop page.

So, if possible, I would test the following against a WooCommerce site with Storefront:

  • Create products with images and load the shop as well as individual products
  • Create posts/pages with images
  • Create posts/pages with galleries

Ensure that images load in all of the above. At this point, it's OK if the image collapses while loading. I am still working on adding/improving placeholder support separately.

Proposed changelog entry for your changes:

Fixes an issue where lazy loaded images could be double processed resulting in the image not being displayed properly.

@ebinnion ebinnion added [Type] Bug When a feature is broken and / or not performing as intended [Status] Needs Review This PR is ready for review. [Pri] BLOCKER [Feature] Lazy Images labels Aug 30, 2018
@ebinnion ebinnion added this to the 6.5 milestone Aug 30, 2018
@ebinnion ebinnion self-assigned this Aug 30, 2018
@ebinnion ebinnion requested a review from a team as a code owner August 30, 2018 12:25
@jetpackbot
Copy link
Collaborator

That's a great PR description, thank you so much for your effort!

Generated by 🚫 dangerJS

@ebinnion ebinnion force-pushed the fix/lazy-images-srcset branch from 0293f07 to 7d3dfa4 Compare August 30, 2018 12:33
Copy link
Contributor

@oskosk oskosk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests well! :shipit:

@oskosk oskosk added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Sep 1, 2018
@oskosk oskosk merged commit ef263f1 into master Sep 1, 2018
@oskosk oskosk deleted the fix/lazy-images-srcset branch September 1, 2018 10:58
@ghost ghost removed the [Status] Ready to Merge Go ahead, you can push that green button! label Sep 1, 2018
@oskosk
Copy link
Contributor

oskosk commented Sep 1, 2018

This one is tagged for 6.5 but #10054 is for 6.6.

@oskosk oskosk modified the milestones: 6.5, 6.6 Sep 3, 2018
jeherve added a commit that referenced this pull request Sep 14, 2018
jeherve added a commit that referenced this pull request Sep 24, 2018
jeherve added a commit that referenced this pull request Sep 25, 2018
* Readme: add boilerplate for next release, 6.6

* Add 6.5 to the changelog.txt file

* Set boilerplate testing list for 6.6

* Readme: update stable tag to 6.5

* Add bullets to 6.5 changelog items

* Readme: add link to previous changelogs

This will help folks who want to know more about past releases,
while keeping the readme.txt short so as to not overwhelm translators and site owners only looking for information about the last release.

* Changelog: add information at the top of the changelog file.

* Changelog: add #10054

* Changelog: add #10078

* Changelog: add #10079

* Changelog: add #10064

* Changelog: add #10094

* Changelog: add #10096

* Testing list: add more information based on #10087

* Changelog: add #9847

* Changelog: add #10084

* Changelog: add #9918

* Changelog: add #7614

* Changelog: add #10116

* Changelog: add #10108

* Changelog: add #10041

* Changelog: add #10121

* Changelog: add #10134

* Changelog: add #10130

* Changelog: add #10109

* changelog: add #10137

* changelog: add #9952

* changelog: add #10120

* changelog: add #10162

* Changelog: add #10163

* Changelog: add #10092

* changelog: add #10156

* Changelog: add #10154

* changelog: add #10122

* Changelog: add #10101

* changelog: add #10105

* changelog: add #10190

* Changelog: add #10196

* changelog: add #10152

* Changelog: add #10153

* Testing list: add more details to Site Verification testing steps.

@see #10143 (comment)

* changelog: add #10194

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

Successfully merging this pull request may close these issues.

5 participants