Hướng dẫn về Image Sitemap

Điều gì an image sitemap là và vì sao điều này tồn tại — đó image namespace, đó image:image và image:loc tags, đó tags Google deprecated trong 2022, accepted formats, và cross-domain images.

Xuất bản lần đầu: 22 thg 6, 2026 · Cập nhật lần cuối: 8 thg 8, 2026 · Advanced
Ngôn ngữ
1 tín hiệu bằng chứng trên trang này

An image sitemap là an extension để một thông thường XML sitemap đó lists của bạn images dùng Google image namespace (http://www.google.com/schemas/sitemap-image/1.1) — không có đó namespace đó image tags là đã bỏ qua. Bạn thêm <image:image> chặn (mỗi với an <image:loc>) bên trong đó <url> entry cho đó trang; lên để 1 000 images theo URL. Điều này surfaces images Google có thể miss (JavaScript-loaded hoặc dynamically phân phối) và bạn có thể put đó tags trong một standalone file hoặc fold them vào an existing sitemap — cả hai là fine. Google deprecated image:caption, image:geo_location, image:tiêu đề và image:license trong August 2022; leaving them trong có không lập chỉ mục effect, so không panic. Accepted image formats là BMP, GIF, JPEG, PNG, WebP, SVG, và AVIF. Cross-domain image hosting hoạt động nếu cả hai domains là verified trong Search Console và robots.txt cho phép crawling. Bing không document image-sitemap hỗ trợ.

Tóm tắt — image sitemap là extension để thông thường XML sitemap: thêm namespace http://www.google.com/schemas/sitemap-image/1.1 để <urlset>, sau đó nest <image:image><image:loc> bên trong mỗi <url> (lên để 1 000 images theo URL). không có namespace image tags là đã bỏ qua. Standalone file hoặc tags trong existing sitemap — cả hai là fine. nó surfaces images Google có thể miss (JS-loaded, dynamically phân phối). Google deprecated image:caption, image:geo_location, image:title, và image:license trong August 2022 — leave them hoặc xóa them, không lập chỉ mục effect either way. Accepted image formats: BMP, GIF, JPEG, PNG, WebP, SVG, AVIF. Cross-domain images hoạt động nếu cả hai domains là verified trong Search Console và robots.txt cho phép crawling. Bing không document image-sitemap hỗ trợ.

Evidence for this claim Image sitemap extensions provide Google with information about images it might otherwise not discover. Scope: Current Google image sitemap behavior. Confidence: high · Verified: Google Search Central: Image sitemaps Evidence for this claim Each image sitemap entry requires image:loc; several legacy image fields were deprecated in 2022. Scope: Current image sitemap schema and deprecated fields. Confidence: high · Verified: Google Search Central: Image sitemap reference

Điều gì nó là, mechanically

image sitemap là sitemap extension, không distinct file loại. bạn take tiêu chuẩn XML sitemap và thêm Google image namespace để root <urlset> element:

xmlns:image="http://www.google.com/schemas/sitemap-image/1.1"

Thì, bên trong đó <url> block cho mỗi trang, bạn thêm một <image:image> element theo image, mỗi containing an <image:loc> với đó image file URL. Google tài liệu mô tả <image:image> as đó element đó “[encloses] all information about a single image,” (bản dịch) «[encloses] all information về một single image,» và note đó mỗi <url> tag có thể contain lên để 1 000 <image:image> tags. So đó structure là: một <url> theo trang → nhiều <image:image> theo <url> → một <image:loc> theo image.

Đó namespace line là load-bearing. Leave điều này off và Google bỏ qua đó image tags hoàn toàn — họ là chỉ unknown XML để điều này. Này là đó single hầu hết phổ biến reason an “image sitemap” (bản dịch) «image sitemap» làm không có gì.

Minimal hợp lệ structure

<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/sample.html</loc>
    <image:image>
      <image:loc>https://example.com/image.jpg</image:loc>
    </image:image>
  </url>
</urlset>

Scripts lens giữ expanded version cho multiple images và implementation kiểm tra; Đây là smallest hữu ích shape để so sánh so với generated output.

Vì sao bother — phát hiện của images Google có thể miss

nếu của bạn images sit trong đơn giản <img src="…"> tags trong phân phối HTML, Google generally tìm thấy them qua thông thường crawl và bạn không strictly cần image sitemap. case cho một là phát hiện của images crawl có thể’t easily see: images loaded hoặc đã đổi trong by JavaScript, images phân phối dynamically, hoặc images referenced trong way đó không phải sạch HTML src. Listing them explicitly cho Google trực tiếp path để images nó sẽ nếu không overlook. Như mỗi sitemap, Đây là phát hiện aid — nó không bảo đảm lập chỉ mục, và nó không phải xếp hạng lever.

Standalone file so với. tags trong existing sitemap

có không right câu trả lời ở đây — Google accepts cả hai. Bạn có thể giữ mọi thứ trong một sitemap và chỉ thêm image tags để đó relevant <url> entries, hoặc generate một dedicated image-chỉ sitemap (thường điều gì một plugin làm) và submit điều này alongside của bạn regular một. Pick whichever của bạn toolchain produces cleanly. Nếu bạn là on một JS framework, tìm kiếm đó framework name plus “sitemap image” (bản dịch) «sitemap image» trước hand-rolling bất cứ điều gì — có thường một module đó đã làm điều này.

deprecated tags — và Vì sao bạn needn’t panic

Này là nơi hầu hết bên thứ ba các hướng dẫn là out of date. Trong August 2022 Google đã xóa four image tags từ của nó tài liệu: <image:caption>, <image:geo_location>, <image:title>, và <image:license>. Google tài liệu chẳng hạn plainly đó điều này “removed the following tags and attributes from our documentation,” (bản dịch) «đã xóa đó sau tags và các thuộc tính từ của chúng ta tài liệu,» listing chính xác những four.

Crucially, removing them từ đó tài liệu đã làm không có nghĩa là bạn đã có để rush out và strip them từ của bạn files. Gary Illyes đã là rõ ràng đó, cho plugin nhà phát triển và anyone managing của họ own sitemaps, “there’s no immediate action required; you can leave these tags and attributes in place without drawbacks.” (bản dịch) «có không immediate hành động bắt buộc; bạn có thể leave những tags và các thuộc tính trong place không có drawbacks.» có không hình phạt và không lập chỉ mục effect either way. So nếu của bạn generator vẫn emits them, leave điều này; nếu bạn’d rather có một sạch file, xóa them. Cả hai là fine — chỉ không treat của họ presence as một vấn đề để cách sửa urgently.

hai tags đó vẫn quan trọng là structural ones: <image:image><image:loc>. đó hiện tại, supported surface area.

Accepted image file formats

MỘT reasonable câu hỏi trước khi bạn bother listing an image: sẽ Google ngay cả chỉ mục điều này? Google Search hỗ trợ images trong BMP, GIF, JPEG, PNG, WebP, SVG, và AVIF — của nó tài liệu chẳng hạn điều này “supports images referenced in the src attribute of img in the following file formats: BMP, GIF, JPEG, PNG, WebP, SVG, and AVIF.” (bản dịch) «hỗ trợ images referenced trong đó src thuộc tính of img trong đó sau file formats: BMP, GIF, JPEG, PNG, WebP, SVG, và AVIF.» Của bạn <image:loc> URL nên point tại một crawlable file trong một of những formats. Point điều này tại điều gì đó Google không thể đọc và listing điều này trong một sitemap sẽ không help.

Cross-domain images

của bạn images không có để trực tiếp on giống nhau domain as trang đó displays them — CDN hoặc dedicated image host là fine. nhưng có hai conditions cho Google để sử dụng cross-domain image references trong sitemap:

  1. Cả hai domains phải là verified trong Search Console ( trang domain và image host domain), và
  2. image host robots.txt phải cho phép Googlebot để crawl image files.

Miss either một và cross-domain images sẽ không là picked lên. nếu bạn phục vụ images từ image subdomain hoặc thứ ba-party CDN, verify đó thuộc tính và kiểm tra của nó robots.txt trước khi bạn assume sitemap là đang làm của nó job.

Thực hành tốt nhất

sitemap là plumbing; image-SEO fundamentals vẫn apply. Follow Google Images xuất bản guidelines: descriptive, chính xác alt text; có ý nghĩa filenames; cao-quality, fast-loading images đó là genuinely relevant để trang họ sit on; và ổn định, crawlable URL cho mỗi image file. List chỉ images bạn thực ra muốn surfaced, và giữ <image:loc> các URL trong supported format. sitemap improves phát hiện; những điều này practices là Điều gì quyết định liệu discovered images làm bất cứ điều gì cho bạn.

note on Bing

Đây là Google extension. Bing không document hỗ trợ cho image sitemaps — của nó sitemap hướng dẫn defers để base sitemaps.org giao thức thay vì thêm image namespace của nó own. So không assume <image:image> tags làm bất cứ điều gì cho Bing; treat image sitemap as Google-cụ thể tool.

nơi điều này sits

image sitemap là một member của nhỏ family của sitemap extensions. base XML sitemap lists của bạn trang các URL; video sitemap làm giống nhau job as điều này một nhưng cho video, với của nó own namespace và tags; sitemap chỉ mục là sitemap-của-sitemaps bạn sử dụng sau khi bạn outgrow single file; và rộng hơn sitemaps overview ties them together. tất cả them là về giống nhau goal đó sits tại top của điều này cluster — phát hiện.

Add an expert note

Pin an expert quote

New person? Create their unclaimed profile at /admin/experts/ → Pin a quote first.