Free auditStart free
GlossaryGlossary · Images

SVG

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.

3 min
read
4
sources
Oct 29, 2026
updated
Scaplet Editorial Team
author
In one line

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.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
XML-based vector format
Type
Listed as a supported format in img src
Google Images
`alt` attribute
Img alt
`<title>`, not `alt`
Inline alt
01At a glance

Vector versus raster

MDN describes SVG as a text-based, open web standard from the W3C: shapes, paths and text described in XML. Because it is vector, it renders at any size without quality loss, unlike bitmap formats such as JPEG or PNG. Because it is text, it can be edited, scripted, compressed and indexed.
Format

SVG

Kind
Vector, XML text
Scales cleanly
Yes
Fits best
Logos, icons, diagrams, simple illustrations
Format

PNG

Kind
Raster
Scales cleanly
No
Fits best
Screenshots, graphics needing lossless pixels
Format

JPEG

Kind
Raster
Scales cleanly
No
Fits best
Photos
Format

WebP and AVIF

Kind
Raster
Scales cleanly
No
Fits best
Photos and graphics at smaller file sizes
03Good to know

SVG in Google Images

Google's image guidance lists the formats it supports for images in an 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.

04How it works

Check it in 2 minutes

Find SVGs and how they are served
# 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)'
Use SVG for
  • Logos and icons that must look sharp at any size
  • Simple diagrams and charts
  • Graphics you want to style or animate with CSS
Use a raster format for
  • Photographs
  • Complex images where the vector file would be huge
  • Screenshots
  1. 01

    Check the markup

    Each informative SVG used as an image needs a meaningful alt. Inline ones need a <title>.

  2. 02

    Check the content type

    You want image/svg+xml. MDN notes SVG files are text and can be compressed. See gzip compression.

  3. 03

    Check it is not a background

    Search your CSS for url(*.svg) used for content images that should be searchable.

  4. 04

    Test in Search Console

    Inspect the page with the URL Inspection tool and confirm the rendered HTML contains the img or inline svg.

Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01Does Google index SVG images?

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.

02How do I add alt text to an inline SVG?

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.

Sources · 4

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • mozilla.org
  • google.com
  1. 01SVG: Scalable Vector Graphics (MDN)developer.mozilla.org · checked 2026-11-01
  2. 02SVG as an image (MDN)developer.mozilla.org · checked 2026-11-01
  3. 03SVG in HTML (MDN)developer.mozilla.org · checked 2026-11-01
  4. 04Google Images best practicesdevelopers.google.com · checked 2026-11-01
Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly