Quellcode durchsuchen

Added height: auto

Signed-off-by: Duncan Lock <duncan.lock@gmail.com>
Duncan Lock vor 12 Jahren
Ursprung
Commit
ec7384fb4e
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      better_figures_and_images/better_figures_and_images.py

+ 1 - 1
better_figures_and_images/better_figures_and_images.py

@@ -38,7 +38,7 @@ def content_object_init(instance):
                 # There must be a setting that I should be using?
                 src = instance.settings['PATH'] + '/images/' + os.path.split(img['src'])[1]
                 im = Image.open(src)
-                extra_style = 'width: {}px;'.format(im.size[0])
+                extra_style = 'width: {}px; height: auto;'.format(im.size[0])
                 if img.get('style'):
                     img['style'] += extra_style
                 else: