Skip to main content

Contact

What are you interested in?

Back to Glossary (S)
Glossary · S

SVG (Scalable Vector Graphics).

SVG (Scalable Vector Graphics) is an image format for vector graphics that stores shapes, lines and text as a mathematical description rather than as pixels. SVG graphics stay pin-sharp at any size and are particularly suited to logos, icons, illustrations and diagrams on the web.

Illustration of "SVG (Scalable Vector Graphics)": Vector graphic with anchor points and its SVG code <svg viewBox="0 0 24 24"> <circle cx="12" cy="7" r="4"/> <path d="M4 20 C4 12 20 12 20 20"/></svg>1.2 KB · always sharp

SVG (Scalable Vector Graphics) — Explained in Detail

Raster graphics such as JPG, PNG or WebP consist of individual pixels. Enlarge them and they become blurred. An SVG file, by contrast, says: 'Draw a circle here with this radius in this colour.' The browser recalculates the image at any size. That is why an SVG logo looks equally sharp on a small smartphone and on a large Retina screen, without needing several file sizes.

SVG is a text-based format built on XML. It can be written directly into a page's HTML (inline), which allows colours to be changed via CSS and elements to be animated — an icon that changes colour on hover, for instance, or a line that draws itself as you scroll. For logos, icons, simple illustrations, maps and diagrams, SVG is usually the best choice; for photos it is unsuitable, because describing millions of colour gradations would produce enormous files.

Many SVG files exported from design programs contain unnecessary ballast: metadata, hidden layers, excessively precise coordinates. Tools such as SVGO strip this out and often reduce file sizes considerably. With inline SVG, accessibility also needs attention: decorative graphics are hidden from screen readers, while meaningful graphics get a title or description — analogous to alt text for images.

One security aspect is often overlooked: because SVG can contain code, scripts can be hidden inside SVG files. Websites where users upload their own files should therefore either block SVG uploads or sanitise them. For your own, checked graphics this risk does not exist.

Example: logo and icons as SVG

An electrician has his logo on the website as a 300-pixel-wide PNG. On high-resolution screens it looks slightly washed out, and the dark footer needs a second file. As an SVG, the logo is sharp everywhere, its colour in the footer is switched via CSS, and the service icons from the same design family are embedded as SVG too. The result: fewer files, sharper display, a consistent appearance.

We deliver logos and icons as optimised SVG as part of corporate design and web design. Animated vector graphics belong to our animations service.

Frequently Asked Questions About SVG (Scalable Vector Graphics)

For logos, icons, simple illustrations, diagrams and anything made up of flat areas and lines. For photos and complex images with many colour gradients, WebP, AVIF or JPG are better suited.

Yes, Google can index SVG files in image search. As with other images, the file name, surrounding text and alt text or title help it understand them.

Ideally, export it as a vector file from the design program, such as Illustrator, Figma or Affinity. Automatic conversions from PNG files often produce messy shapes and large files.

Ready for Your Project?

Apply this knowledge to your website — DLM Digital will help you.