Filirom1/css-base64-images — pull request #4 by trygve-lie (2013-01-23 14:40:52+00:00)
Title: Use mediatype in dataurl instead of filename extension

According to the specification of the [the "data" URL scheme](http://tools.ietf.org/html/rfc2397), the dataurl should use a mediatype.

This pull request changes the behavior in this module to append a mediatype in the dataurl instead of a filenames extension. Using just the filename extension in the dataurl causes some problems for some files.

The best example is that svg as backgrounds will not work in most browsers if the mediatype is wrong.

By using just the filename extension of a svg file we will get the following, and failing, dataurl:
data:image/svg;base64

The correct, and working, dataurl is:
data:image/svg+xml;base64