andrewdavey/cassette — pull request #151 by christophercliff (2012-01-27 22:42:01+00:00)
Title: Extension methods for embedding images/fonts, etc.

Updated stylesheet config to use extension methods for embedding fonts and images. Extension methods accept an optional param to specify what paths to embed:

```cs
bundles.Add(
"styles",
(bundle) => bundle.Processor = new StylesheetPipeline()
.EmbedImages(whitelistPath => whitelistPath.Contains("/embed/"))
.EmbedFonts(whitelistPath => whitelistPath.Contains("/embed/"))
);
```

Image embeds will leave the original reference so IE < 8 will still work (not sure if MHTML support is worth it at this point). E.g.

```css
background: url('/_cassette/file/images/google-plus-32_6f613a8d2d4db99de86a0e83503e79f23d92b3ad_png') right no-repeat;
background: url(data:image/png;base64,) right no-repeat;
```

Images greater than 32 kB will not be embedded.

TTF and OTF fonts will be embedded.