mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 11:36:16 +00:00
Generate thumbnails on the fly with PIL
Removed the need of having 3 copies of an image Fixes more Sass(y) stuff
This commit is contained in:
parent
2455d3f88c
commit
a10a5a8793
10 changed files with 149 additions and 76 deletions
|
@ -25,7 +25,7 @@ def image(id):
|
|||
|
||||
# Get exif data from image
|
||||
try:
|
||||
file = Image.open(os.path.join(current_app.instance_path, current_app.config['UPLOAD_FOLDER'], 'original', image['file_name']))
|
||||
file = Image.open(os.path.join(current_app.config['UPLOAD_FOLDER'], 'original', image['file_name']))
|
||||
raw_exif = file.getexif()
|
||||
human_exif = {}
|
||||
|
||||
|
@ -43,6 +43,7 @@ def image(id):
|
|||
except:
|
||||
# Cringe, no file present
|
||||
human_exif = False
|
||||
file = False
|
||||
|
||||
# All in le head
|
||||
return render_template('image.html', image=image, exif=human_exif, file=file)
|
Loading…
Add table
Add a link
Reference in a new issue