summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfunvit <funvit@gmail.com>2013-10-01 15:09:59 +0400
committerfunvit <funvit@gmail.com>2013-10-01 15:09:59 +0400
commit40ef70cbd4ce5e377da50cf7833cd8b4b6251fbe (patch)
treeb40188fb7cc50dfb68f216592df76fb495019ab1
parentc8f949105a9e34e55a578445014f2d6a6f0a674b (diff)
downloadpyscss-40ef70cbd4ce5e377da50cf7833cd8b4b6251fbe.tar.gz
mime
-rw-r--r--scss/functions/compass/images.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/scss/functions/compass/images.py b/scss/functions/compass/images.py
index a17073e..6e25f24 100644
--- a/scss/functions/compass/images.py
+++ b/scss/functions/compass/images.py
@@ -164,6 +164,8 @@ def _image_url(path, only_path=False, cache_buster=True, dst_color=None, src_col
new_image.save(output, format='PNG')
contents = output.getvalue()
output.close()
+ if not mime_type:
+ mime_type = 'image/%s' % _path.split('.')[-1]
url = 'data:' + mime_type + ';base64,' + base64.b64encode(contents)
else:
url = os.path.join(BASE_URL.rstrip('/'), filepath.lstrip('/'))