summaryrefslogtreecommitdiff
path: root/app/photos/utils.py
diff options
context:
space:
mode:
authorluxagraf <sng@luxagraf.net>2016-03-20 21:30:28 -0400
committerluxagraf <sng@luxagraf.net>2016-03-20 21:30:28 -0400
commit96d80eaf238045faba45cd4b64a8d93d19a98a69 (patch)
treea12bb2c4fe7573946942c425a2d15044f7e20e4c /app/photos/utils.py
parent86bb919d5e87b33f93c2d09c6fe36eb2f393b7e6 (diff)
Wrote image app to work with other models. Broke galleries badly, need
to fix before posting again. Also major admin image move to pull off.
Diffstat (limited to 'app/photos/utils.py')
-rw-r--r--app/photos/utils.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/photos/utils.py b/app/photos/utils.py
index 6cc64a3..e880277 100644
--- a/app/photos/utils.py
+++ b/app/photos/utils.py
@@ -1,4 +1,7 @@
import os
+import subprocess
+
+# pip install python-resize-image
from resizeimage import resizeimage
@@ -13,3 +16,4 @@ def resize_image(img, width=None, height=None, quality=72, base_path="", filenam
os.makedirs(base_path)
path = "%s%s" % (base_path, filename)
newimg.save(path, newimg.format, quality=quality)
+ subprocess.call(["jpegoptim", "%s" % path])