谷歌+分享-错误的图像



我正在处理G+分享的一个奇怪行为。我编写了两个轻量级HTML页面来演示我的问题。除了身体上的图像外,这些页面几乎是相同的。在第一页上,内容图像比og:图像大得多。在第二页,内容图像略小于og:image.

第一个HTML页面:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta property="og:title" content="Test page" />
        <meta property="og:description" content="This is page for G+ strange behavior testing." />
        <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/wikimania2014/thumb/e/e2/Ask-Logo-Small.jpg/250px-Ask-Logo-Small.jpg" />
        <title>Test page</title>
    </head>
    <body>
        <div>
            <p>Hello world!</p>
            <img src="https://upload.wikimedia.org/wikipedia/commons/3/3f/Fronalpstock_big.jpg" />
        </div>
    </body>
</html>

第二个HTML页面:

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta property="og:title" content="Test page" />
        <meta property="og:description" content="This is page for G+ strange behavior testing." />
        <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/wikimania2014/thumb/e/e2/Ask-Logo-Small.jpg/250px-Ask-Logo-Small.jpg" />
        <title>Test page</title>
    </head>
    <body>
        <div>
            <p>Hello world!</p>
            <img src="http://previewcf.turbosquid.com/Preview/2014/07/05__19_56_51/01.jpg90ddaa05-e3a9-4607-b466-29ade8412934Small.jpg" />
        </div>
    </body>
</html>

问题在于,在第一种情况下,G+显示来自正文的图像(忽略og:image)。在第二种情况下,G+按预期显示og:image。

我也尝试过使用模式微数据,但行为是相同的。我使用https://plus.google.com/share?url=PAGE_URL共享页面。

解决!原因是在第二种情况下,og:图像的宽度小于G+要求的宽度。

最新更新