themes icon indicating copy to clipboard operation
themes copied to clipboard

Apostrophe 2: Lazy Images Causes Duplicate Images on Home Page

Open tmmbecker opened this issue 7 years ago • 28 comments

Chrome Browser version Version 66.0.3359.181

When Automatically use first image in post and Display on blog and archives are active in Content Options, Jetpack's Lazy Images module causes duplicate images to appear on the home page for posts with no selected Featured Image.

I found this while doing a guided transfer for a user. I've disabled Lazy Images on that site for now and not mentioned it to them. All is well on the user's site.

I am able to replicate this on my test site.

Steps to replicate

  1. Open the Customizer and go to Content Options.
  2. Select both Display on blog and archives and Automatically use first image in post. Publish those changes.
  3. Go to Jetpack → Settings → Discussion.
  4. Activate Lazy load images.
  5. Create a post with images in the body but no featured image selected.
  6. Observe the duplicate images on the home page.

annotation on 2018-5-4

From Inspect Element:

<img src="https://i2.wp.com/tracyspress.net/wp-content/uploads/2018/04/ast3.jpg?zoom=2&amp;resize=224%2C224&amp;crop=1" title="Galleries in Email" class="attachment-post-thumbnail wp-post-image jetpack-lazy-image--handled" data-lazy-loaded="1" width="224" height="224" srcset="https://i2.wp.com/tracyspress.net/wp-content/uploads/2018/04/ast3.jpg?zoom=2&amp;resize=224%2C224&amp;crop=1" src-orig="https://i2.wp.com/tracyspress.net/wp-content/uploads/2018/04/ast3.jpg?resize=450%2C450&amp;crop=1" scale="2">

<img src="https://i2.wp.com/tracyspress.net/wp-content/uploads/2018/04/ast3.jpg?zoom=2&amp;resize=224%2C224&amp;crop=1" title="Galleries in Email" class="attachment-post-thumbnail wp-post-image" width="224" height="224" srcset="https://i2.wp.com/tracyspress.net/wp-content/uploads/2018/04/ast3.jpg?zoom=2&amp;resize=224%2C224&amp;crop=1" src-orig="https://i2.wp.com/tracyspress.net/wp-content/uploads/2018/04/ast3.jpg?resize=450%2C450&amp;crop=1" scale="2">

Result

Duplicate images appear for posts with no featured image.

Expected

Only one image would appear for each post.

  • Follow-up ticket: No need to follow up here.
  • User's site: https://tracyspress.net/ (This is my test site. I've left the theme and Lazy Images in place for now. )

tmmbecker avatar Jun 07 '18 19:06 tmmbecker

We've had another report of this issue in 1576490-z and I can confirm I was able to replicate by following the steps Tracy laid out.

SiobhyB avatar Nov 19 '18 21:11 SiobhyB

I can recreate this on my AT test site as well.

laurelfulford avatar Dec 27 '18 19:12 laurelfulford

Also reported in #2099736-hc, disabling Lazy Load in Jetpack resolved the issue

edequalsawesome avatar Mar 21 '19 22:03 edequalsawesome

11534469-hc

tbradsha avatar Mar 25 '19 15:03 tbradsha

#2136973-zen

Turning off lazy load resolved the issue.

ktyfuller604 avatar Jun 26 '19 20:06 ktyfuller604

Another report in 2192057-zen.

julsyd avatar Jul 19 '19 16:07 julsyd

Also reported at 2207999-zen

swoodipto avatar Jul 26 '19 12:07 swoodipto

This also happens if you set up a Testimonials page. So I believe it's featured image-related.

eduardozulian avatar Sep 03 '19 21:09 eduardozulian

Another one reported at #2795391-zen

galakhyati avatar Mar 17 '20 09:03 galakhyati

I had another instance of this: 23133698-hc

I used a CSS workaround:

/*Hide duplicated featured image on front page 23133698-hc sy*/
article .wp-post-image:last-child {
display: none;
}

sophiegyo avatar Aug 05 '20 07:08 sophiegyo

#25094225-hc

Gave the CSS workaround and suggested using featured images for future, to make sure the site is ready for future themes.

nagpai avatar Oct 23 '20 08:10 nagpai

#24589384-hc

Suggested they disable lazy load and that did the trick.

mdrockwell avatar Oct 31 '20 14:10 mdrockwell

Another report: #3459502-zen

rinazrina avatar Nov 03 '20 09:11 rinazrina

Another report in 25349441-hc

eduardozulian avatar Nov 04 '20 15:11 eduardozulian

Another: 26114907-hc

mdrockwell avatar Dec 04 '20 18:12 mdrockwell

Got a report here: 26651887-hc

AtrumGeost avatar Dec 29 '20 20:12 AtrumGeost

30343723-hc & 23138678-hc

xpurichan avatar Jun 26 '21 20:06 xpurichan

32283363-hc

jackiejade avatar Oct 19 '21 14:10 jackiejade

Another report here: 4644512-zd-woothemes

ClassicRKR27 avatar Dec 29 '21 13:12 ClassicRKR27

Another report here: 34996016-hc I didn't see this bug while chatting so I used a CSS workaround:

.home .entry-thumbnail img:first-child {
    display: none;
}

ccwalburn avatar Mar 31 '22 12:03 ccwalburn

I can confirm this is still an issue.

Robertght avatar Apr 21 '22 09:04 Robertght

As a part of this repository’s maintenance, this issue is being marked as stale due to inactivity. Please feel free to comment on it in case we missed something.

github-actions[bot] avatar May 21 '22 10:05 github-actions[bot]

@Automattic/dotcom-pa-group, opening this again as the priority is still set as high. Would it make sense to lower the priority given it's one of our old themes?

eduardozulian avatar May 23 '22 18:05 eduardozulian

Apostrophe 2 is currently active on at least 263,488 sites.

I'm setting this to Normal for now. cc @jeffikus

Robertght avatar May 24 '22 18:05 Robertght

#5254229-zen I turned off Lazy Load as a workaround for them

dcoleonline avatar May 29 '22 23:05 dcoleonline

As a part of this repository’s maintenance, this issue is being marked as stale due to inactivity. Please feel free to comment on it in case we missed something.

github-actions[bot] avatar Jul 04 '22 06:07 github-actions[bot]

Another case here- 5373951-zd-woothemes Disabled lazy loading.

essleeung avatar Jul 14 '22 04:07 essleeung

As a part of this repository’s maintenance, this issue is being marked as stale due to inactivity. Please feel free to comment on it in case we missed something.

github-actions[bot] avatar Aug 13 '22 08:08 github-actions[bot]

Another case in 35851604-hc, turning off lazy loading removed the duplicate images

Jaccuse avatar Aug 25 '22 15:08 Jaccuse

Support References

This comment is automatically generated. Please do not edit it.

  • [ ] 2136973-zen
  • [ ] 2192057-zen
  • [ ] 2207999-zen
  • [ ] 2795391-zen
  • [ ] 3459502-zen
  • [ ] 4644512-zen
  • [ ] 5254229-zen
  • [ ] 5373951-zen

github-actions[bot] avatar Aug 25 '22 15:08 github-actions[bot]