*CAUTION: If you have CSS with relative paths (to imports, images, ...), you should always specify a target path! Then those relative paths will be adjusted in accordance with the new path.*
The CSS minifier will automatically embed referenced files (like images, fonts, ...) into the minified CSS, so they don't have to be fetched over multiple connections.
However, for really large files, it's likely better to load them separately (as it would increase the CSS load time if they were included.)
This method allows the max size of files to import into the minified CSS to be set (in kB). The default size is 5.
```php
$minifier->setMaxImportSize(10);
```
### setImportExtensions(extensions) *(CSS only)*
The CSS minifier will automatically embed referenced files (like images, fonts, ...) into minified CSS, so they don't have to be fetched over multiple connections.
This methods allows the type of files to be specified, along with their data:mime type.
The default embedded file types are gif, png, jpg, jpeg, svg & woff.
Simply add a dependency on matthiasmullie/minify to your composer.json file if you use [Composer](https://getcomposer.org/) to manage the dependencies of your project:
If you're interested in learning some of the harder technical challenges I've encountered building this, you probably want to take a look at [what I wrote about it](http://www.mullie.eu/dont-build-your-own-minifier/) on my blog.