lazyload_images and google rich snippets issue

8 views
Skip to first unread message

Hemant Nandrajog

unread,
May 7, 2013, 1:04:26 AM5/7/13
to mod-pagespeed...@googlegroups.com
Hello, 

I am using schema.org tags on my website 

This page is a profile of a person so it has image associated with it and enabling lazyload_images changes the source to 
opentag img class="right" pagespeed_lazy_src='http://bollywoodfans.in/uploads/947935588dff4708827b5002f64300e8.jpg' width='225' height='278' alt='Profile of Amitabh Bachchan' id="profile_image" itemprop="image" pagespeed_url_hash="1798284704" src="/mod_pagespeed_static/1.Hy2LQaukh5.gif" onload="pagespeed.lazyLoadImages.loadIfVisible(this);"/ closetag

Now that is fine if a user is viewing the page because the image loads immediately after page load 

Google rich snippet tool to check the data it uses the placeholder image as the image of the person. 

I know that lazyload can be eliminated  with pagespeed_no_defer="" in the img src but was just wondering if it can be done at pagespeed level itself like not serving lazyload to bots?

Thanks
Hemant

Matt Atterbury

unread,
May 7, 2013, 8:00:20 AM5/7/13
to Hemant Nandrajog, mod-pagespeed-beta-testers
Hi,

I don't know anything about the rich snippet too. How does it work?
Does it automatically crawl your site, or do you apply it to your site somehow?
If you apply it yourself you could try adding ?ModPagespeed=off to the URL, like so:

Also, when I look at the page with the tool it looks fine - I'm guessing you've disabled it for now?

cheers, m.
--
"Klaatu barada nikto"                          (754) 444-6288

theartofweb

unread,
May 8, 2013, 5:30:15 AM5/8/13
to mod-pagespeed...@googlegroups.com, Hemant Nandrajog
We also use (Google) Rich Snippets and this could be a problem.


<div itemscope itemtype="http://data-vocabulary.org/Product">
<img name="mainphoto" pagespeed_lazy_src="/images/medium/product_10755_0.jpg" width="450" height="450" border="0" alt="Mukti Cleansing lotion - Dry, Mature, Sensitive Skin" itemprop="image" pagespeed_url_hash="230086851" src="/spacer.gif" onload="pagespeed.lazyLoadImages.loadIfVisible(this);">
</div>

Both the "Google Structured Data Testing Tool" and the "Microdata Parser" (http://tools.seomoves.org/microdata/) detect the spacer gif instead of the original image.

Note that for this particular example this is only a problem while the beacon is being called and not on later requests.  Because the image is above the fold it is not tagged for lazy_load on subsequent requests.  Any tagged images below the fold would be read incorrectly every time.

Matt, these 'microdata' attributes are read by Googlebot and other spiders during their normal spidering process.  The best solution is probably to be able to skip images that have the itemprop attribute.

Jud Porter

unread,
May 8, 2013, 4:05:36 PM5/8/13
to theartofweb, mod-pagespeed...@googlegroups.com, Hemant Nandrajog
Thanks for the report guys. We normally disable the lazyload filter for bots, since it does affect image search results. We didn't have the user agent used by the google structured data tool in our list of bots though. We've gone ahead and added that to our list, so it will be fixed in our next release, or you can update now if building from source. Unfortunatly that Microdata Parse tool (http://tools.seomoves.org/microdata/) looks like it requests pages with a blank UA, so we aren't able to do anything there. You can request the page with the "?ModPagespeed=off" query param for testing though as Matt suggested.

theartofweb

unread,
May 9, 2013, 7:02:35 AM5/9/13
to mod-pagespeed...@googlegroups.com, theartofweb, Hemant Nandrajog
As long as the search engines that actually use the Microdata (Bing, Google, Yahoo! and Yandex?) can see it reliably that should be ok.
Is it documented anywhere which user agents are identified as 'bots' and which features are tweaked for them?  And can we control this?

Jud Porter

unread,
May 10, 2013, 10:22:43 AM5/10/13
to theartofweb, mod-pagespeed-beta-testers, Hemant Nandrajog
We don't have good documentation on our behavior with bots, but you can see the list of bots we check against at https://code.google.com/p/modpagespeed/source/browse/trunk/src/net/instaweb/http/bot_checker.gperf. It's generated primarily from http://www.robotstxt.org plus a few other user agents we have noticed in our logs. I believe lazyload is the only filter that we disable for bots, since moving the image URL breaks image search results (as you noticed).
Reply all
Reply to author
Forward
0 new messages