SVG
- Kind
- Vector, XML text
- Scales cleanly
- Yes
- Fits best
- Logos, icons, diagrams, simple illustrations
SVG is an XML-based vector image format. How to embed it, what each method allows, and the alt text and Google Images points to get right.
SVG (Scalable Vector Graphics) is an XML-based markup language for two-dimensional vector graphics, so it scales to any size without losing quality. Google Images supports SVG for images referenced in an img element's src attribute. Inline SVG takes a title element instead of alt text.
Four quick questions, then a straight answer.
From your answers, this is quietly costing you traffic and nobody has the hours to chase it. Scaplet finds every affected page, drafts the fixes and tracks how AI answers mention you.
A data platform shipped 46 fixes without a ticket.
This looks handled. Re-check after a redesign, a migration or a big content push; that is when it breaks.
Your site is small and you have the time. Work through the steps on this page, starting with the pages that get the most traffic.
<img src>alt attribute<svg><title>, <desc>, ARIA. alt is not supported<title><object>, <iframe>, <embed><!-- As an image: gets alt text -->
<img src="/logo.svg" alt="Acme logo" width="120" height="32">
<!-- Inline: part of the DOM, uses title and ARIA -->
<svg viewBox="0 0 100 100" role="img" aria-labelledby="t">
<title id="t">Growth chart</title>
<circle cx="50" cy="50" r="40" fill="teal" />
</svg>
<!-- Separate document, keeps scripts and external resources -->
<object data="/chart.svg" type="image/svg+xml"></object>MDN lists the image-context limits: JavaScript is disabled, external resources such as images and stylesheets do not load unless inlined as data: URLs, and some link and widget styling is off. If an SVG needs scripts or external files, MDN says to embed it with object, iframe or embed.
img element's src attribute: BMP, GIF, JPEG, PNG, WebP, SVG and AVIF. It finds images in img elements and does not index CSS background images. It also says inline <svg> elements take a <title> rather than an alt attribute.Everything else in Google's image advice still applies: descriptive filenames, useful alt text without keyword stuffing, and one consistent URL per image across pages. See image SEO and alt text.
# Every svg referenced in img tags
curl -s https://example.com/ | grep -o '<img[^>]*\.svg[^>]*>'
# Content type and compression of one file
curl -sI -H 'Accept-Encoding: gzip, br' https://example.com/logo.svg | grep -iE '^(content-type|content-encoding|cache-control)'Each informative SVG used as an image needs a meaningful alt. Inline ones need a <title>.
You want image/svg+xml. MDN notes SVG files are text and can be compressed. See gzip compression.
Search your CSS for url(*.svg) used for content images that should be searchable.
Inspect the page with the URL Inspection tool and confirm the rendered HTML contains the img or inline svg.
2 questions people ask next, answered from the sources on this page.
Google's image guidance lists SVG among supported formats for images referenced in an img element's src attribute. It does not index CSS background images, so the markup matters.
Inline SVG does not support the alt attribute. Use a title element as the first child, optionally a desc element, and ARIA attributes such as role="img" and aria-labelledby.
The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.