Categories
Opera blog post Web development

SVG Image and Background Image Replacer

It’s here! A working version of the SVG image replacement script.

Purpose

This script substitutes specified images and background images with SVG images for web browsers that support them. This makes it perfect for anyone who would like to start using SVG for their site design, but wants to make sure it will look okay for browsers that do not yet support it.

Features

  • Future-proof – Checks for actual support, no browser sniffing
  • Unobtrusive – Only affects browsers with support, uses fallback content without support or if javascript is disabled
  • Simple to use – Just include one javascript file to your pages and use the appropriate image names
  • Small file – Only 1.8 KB!