diff options
author | luxagraf <sng@luxagraf.net> | 2016-03-20 21:30:28 -0400 |
---|---|---|
committer | luxagraf <sng@luxagraf.net> | 2016-03-20 21:30:28 -0400 |
commit | 96d80eaf238045faba45cd4b64a8d93d19a98a69 (patch) | |
tree | a12bb2c4fe7573946942c425a2d15044f7e20e4c /app/photos/utils.py | |
parent | 86bb919d5e87b33f93c2d09c6fe36eb2f393b7e6 (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.py | 4 |
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]) |