让搜索引擎知道原图
Let search engines know the original image
我有一个包含一些大图片的网站。它们默认调整大小,但当您单击它们时,它们会在灯箱中打开并变大。我想让搜索引擎知道原始的(更大的)图像,而不是源代码中包含的较小的调整大小的图像。有没有办法让他们索引更大的图像?
您无法决定 google 选择索引的内容(但您可以使用 piyush13 答案使 google 更容易),但您可以告诉它什么不索引。
将其放入您的 robot.txt 文件中:
User-agent: Googlebot-Image
Disallow: /images/myImage.jpg // Put your images or directly the folder
来源:https://support.google.com/webmasters/answer/35308?hl=en
(待适配其他搜索引擎)
Image sitemap 是 Google
的方法
you can use Google image extensions for sitemaps to give Google more information about the images available on your pages. Image sitemap information helps Google discover images that we might not otherwise find (such as images your site reaches with JavaScript code), and allows you to indicate images on your site that you want Google to crawl and index.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>http://example.com/sample.html</loc>
<image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>
<image:image>
<image:loc>http://example.com/photo.jpg</image:loc>
</image:image>
</url>
</urlset>
来源:https://support.google.com/webmasters/answer/178636?hl=en
我有一个包含一些大图片的网站。它们默认调整大小,但当您单击它们时,它们会在灯箱中打开并变大。我想让搜索引擎知道原始的(更大的)图像,而不是源代码中包含的较小的调整大小的图像。有没有办法让他们索引更大的图像?
您无法决定 google 选择索引的内容(但您可以使用 piyush13 答案使 google 更容易),但您可以告诉它什么不索引。 将其放入您的 robot.txt 文件中:
User-agent: Googlebot-Image
Disallow: /images/myImage.jpg // Put your images or directly the folder
来源:https://support.google.com/webmasters/answer/35308?hl=en (待适配其他搜索引擎)
Image sitemap 是 Google
的方法you can use Google image extensions for sitemaps to give Google more information about the images available on your pages. Image sitemap information helps Google discover images that we might not otherwise find (such as images your site reaches with JavaScript code), and allows you to indicate images on your site that you want Google to crawl and index.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<url>
<loc>http://example.com/sample.html</loc>
<image:image>
<image:loc>http://example.com/image.jpg</image:loc>
</image:image>
<image:image>
<image:loc>http://example.com/photo.jpg</image:loc>
</image:image>
</url>
</urlset>
来源:https://support.google.com/webmasters/answer/178636?hl=en