module Prawn::SVG::Loaders

Load a file from disk.

WINDOWS

Windows is supported, but must use URLs in the modern structure like:

file:///x:/path/to/the/file.png

or as a relative path:

directory/file.png

or as an absolute path from the current drive:

/path/to/the/file.png

Ruby's URI parser does not like backslashes, nor can it handle filenames as URLs starting with a drive letter as it thinks you're giving it a scheme.

URL ENCODING

This module assumes the URL that is passed in has been URL-encoded. If for some reason you're passing in a filename that hasn't been taken from an XML document's attribute, you will want to URL encode it before you pass it in.