จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Sitemap สำหรับรูปภาพ
Sitemap สําหรับรูปภาพเป็นวิธีหนึ่งในการบอกให้ Google ทราบเกี่ยวกับรูปภาพอื่นๆ ในเว็บไซต์ของคุณ โดยเฉพาะรูปภาพที่เราอาจหาไม่พบ (เช่น รูปภาพที่เว็บไซต์เข้าถึงด้วยโค้ด JavaScript) คุณสามารถสร้าง Sitemap สำหรับรูปภาพแยกต่างหาก หรือจะเพิ่มแท็ก Sitemap สำหรับรูปภาพลงใน Sitemap ที่มีอยู่ก็ได้ โดยทั้ง 2 วิธีใช้ได้สำหรับ Google ดีเท่าๆ กัน
Sitemap สำหรับรูปภาพจะอิงตาม Sitemap ทั่วไป จึงสามารถใช้แนวทางปฏิบัติแนะนำเกี่ยวกับ Sitemap ทั่วไปกับ Sitemap สำหรับรูปภาพด้วย นอกจากนี้เราขอแนะนำให้ทำตามแนวทางปฏิบัติแนะนำทั่วไปในการเผยแพร่รูปภาพ
ตัวอย่าง Sitemap สำหรับรูปภาพ
ตัวอย่างต่อไปนี้แสดง Sitemap ปกติที่มีส่วนขยาย Sitemap ที่มีองค์ประกอบ <url>
2 รายการ
https://example.com/sample1.html
ซึ่งมีรูปภาพ 2 รูป
https://example.com/sample2.html
ซึ่งมีรูปภาพ 1 รูป
<?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>https://example.com/sample1.html</loc>
<image:image>
<image:loc>https://example.com/image.jpg</image:loc>
</image:image>
<image:image>
<image:loc>https://example.com/photo.jpg</image:loc>
</image:image>
</url>
<url>
<loc>https://example.com/sample2.html</loc>
<image:image>
<image:loc>https://example.com/picture.jpg</image:loc>
</image:image>
</url>
</urlset>
การอ้างอิง Sitemap สำหรับรูปภาพ
แท็ก image
จะได้รับการกำหนดในเนมสเปซของ Sitemap สำหรับรูปภาพ
http://www.google.com/schemas/sitemap-image/1.1
คุณต้องใช้แท็กที่จําเป็นต่อไปนี้เพื่อให้ Google ใช้ Sitemap สำหรับรูปภาพได้
แท็กที่จำเป็น |
<image:image> |
ใส่ข้อมูลทั้งหมดเกี่ยวกับรูปภาพเดียว แท็ก <url> แต่ละรายการมีแท็ก <image:image> ได้สูงสุด 1,000 แท็ก
|
<image:loc> |
URL ของรูปภาพ
ในบางกรณี URL รูปภาพอาจไม่อยู่บนโดเมนเดียวกันกับเว็บไซต์หลักของคุณ ซึ่งไม่เป็นปัญหาแต่อย่างใด ตราบเท่าที่ทั้ง 2 โดเมนได้รับการยืนยันใน Search Console ตัวอย่างเช่น หากคุณใช้เครือข่ายนำส่งข้อมูล เช่น Google Sites เพื่อโฮสต์รูปภาพของคุณ โปรดตรวจสอบว่าเว็บไซต์ที่ให้บริการโฮสติ้งนั้นได้รับการยืนยันใน Search Console แล้ว นอกจากนี้ ให้ตรวจสอบว่าไฟล์ robots.txt ไม่บล็อกการ Crawl เนื้อหาใดๆ ที่คุณต้องการให้มีการจัดทำดัชนี
|
แท็กและแอตทริบิวต์ที่เรานำออกจากเอกสารประกอบ ได้แก่
<image:caption>
, <image:geo_location>
,
<image:title>
, <image:license>
ดูข้อมูลเพิ่มเติมได้ที่ประกาศการเลิกใช้งาน
แหล่งข้อมูลเพิ่มเติม
หากต้องการข้อมูลเพิ่มเติม ลองไปที่แหล่งข้อมูลต่อไปนี้
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-08-04 UTC
[null,null,["อัปเดตล่าสุด 2025-08-04 UTC"],[[["\u003cp\u003eImage sitemaps inform Google about images on your site, including those loaded with JavaScript, which can be created separately or integrated into existing sitemaps.\u003c/p\u003e\n"],["\u003cp\u003eGeneral sitemap best practices and image publishing guidelines should be followed for optimal image indexing.\u003c/p\u003e\n"],["\u003cp\u003eEach \u003ccode\u003e<url>\u003c/code\u003e tag in an image sitemap can contain up to 1,000 \u003ccode\u003e<image:image>\u003c/code\u003e tags, with \u003ccode\u003e<image:loc>\u003c/code\u003e specifying the image URL, even if hosted on a different verified domain.\u003c/p\u003e\n"],["\u003cp\u003ePreviously supported tags like \u003ccode\u003e<image:caption>\u003c/code\u003e, \u003ccode\u003e<image:geo_location>\u003c/code\u003e, \u003ccode\u003e<image:title>\u003c/code\u003e, and \u003ccode\u003e<image:license>\u003c/code\u003e are now deprecated.\u003c/p\u003e\n"],["\u003cp\u003eYou can submit your image sitemap to Google and combine it with other sitemap extensions for comprehensive indexing.\u003c/p\u003e\n"]]],["Image sitemaps inform Google about images on a site, including those found via JavaScript. Create a separate image sitemap or add image tags to an existing one. Use the `\u003cimage:image\u003e` tag to enclose image details, allowing up to 1,000 per `\u003curl\u003e`, and utilize the `\u003cimage:loc\u003e` tag for the image's URL. Ensure both your main and any image hosting domains are verified in Search Console. Deprecated tags include `\u003cimage:caption\u003e`, `\u003cimage:geo_location\u003e`, `\u003cimage:title\u003e`, and `\u003cimage:license\u003e`.\n"],null,["# Image Sitemaps | Google Search Central\n\nImage sitemaps\n==============\n\n\nImage sitemaps are a way of telling Google about other images on your site, especially those that\nwe might not otherwise find (such as images your site reaches with JavaScript code). You can\ncreate a separate image sitemap or add image sitemap tags to your existing sitemap; either\napproach is equally fine for Google.\n\n\nImage sitemaps are based on generic sitemaps so the\n[general sitemap best practices](/search/docs/crawling-indexing/sitemaps/build-sitemap#general-guidelines)\nalso apply to image sitemaps. We also recommend that you follow the\n[general best practices for publishing images](/search/docs/appearance/google-images).\n\nExample image sitemap\n---------------------\n\n\nThe following example shows a regular sitemap with image sitemap extension, with two\n`\u003curl\u003e` elements:\n\n- `https://example.com/sample1.html`, which contains two images\n- `https://example.com/sample2.html`, which contains one image\n\n```text\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003curlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\"\n xmlns:image=\"http://www.google.com/schemas/sitemap-image/1.1\"\u003e\n \u003curl\u003e\n \u003cloc\u003ehttps://example.com/sample1.html\u003c/loc\u003e\n \u003cimage:image\u003e\n \u003cimage:loc\u003ehttps://example.com/image.jpg\u003c/image:loc\u003e\n \u003c/image:image\u003e\n \u003cimage:image\u003e\n \u003cimage:loc\u003ehttps://example.com/photo.jpg\u003c/image:loc\u003e\n \u003c/image:image\u003e\n \u003c/url\u003e\n \u003curl\u003e\n \u003cloc\u003ehttps://example.com/sample2.html\u003c/loc\u003e\n \u003cimage:image\u003e\n \u003cimage:loc\u003ehttps://example.com/picture.jpg\u003c/image:loc\u003e\n \u003c/image:image\u003e\n \u003c/url\u003e\n\u003c/urlset\u003e\n```\n\nImage sitemap reference\n-----------------------\n\n\nThe `image` tags are defined in the Image Sitemaps namespace:\n[`http://www.google.com/schemas/sitemap-image/1.1`](http://www.google.com/schemas/sitemap-image/1.1)\n\n\nTo make sure Google can use your image sitemap, you must use the following required tags:\n\n| Required tags ||\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `\u003cimage:image\u003e` | Encloses all information about a single image. Each `\u003curl\u003e` tag can contain up to 1,000 `\u003cimage:image\u003e` tags. |\n| `\u003cimage:loc\u003e` | The URL of the image. In some cases, the image URL may not be on the same domain as your main site. This is fine, as long as you verify both domains in Search Console. If, for example, you use a content delivery network such as Google Sites to host your images, make sure that the hosting site is verified in Search Console. In addition, make sure that your [robots.txt](/search/docs/crawling-indexing/robots/intro) file doesn't disallow the crawling of any content you want indexed. |\n\n### Deprecated tags and attributes\n\n\nWe removed the following tags and attributes from our documentation:\n`\u003cimage:caption\u003e`, `\u003cimage:geo_location\u003e`,\n`\u003cimage:title\u003e`, `\u003cimage:license\u003e`. See the\n[deprecation announcement](/search/blog/2022/05/spring-cleaning-sitemap-extensions)\nfor more information.\n\nAdditional resources\n--------------------\n\n\nWant to learn more? Check out the following resources:\n\n- [Submit your sitemap to Google](/search/docs/crawling-indexing/sitemaps/build-sitemap#addsitemap)\n- [Learn how to combine sitemap extensions](/search/docs/crawling-indexing/sitemaps/combine-sitemap-extensions)"]]