From ffc51f648b93571d906627ff09b2de087017f1c7 Mon Sep 17 00:00:00 2001 From: Joseph Wynn Date: Sun, 12 Mar 2017 14:14:45 +0000 Subject: [PATCH] Rename auto rotate option to auto_rotate --- README.md | 6 +++--- lib/jekyll-responsive-image/resize_handler.rb | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c3b6db1..a81d10c 100644 --- a/README.md +++ b/README.md @@ -46,11 +46,11 @@ responsive_image: - width: 800 - width: 1400 quality: 90 - + # [Optional, Default: false] # Rotate resized images depending on their EXIF rotation attribute. Useful for # working with JPGs directly from digital cameras and smartphones - respect_exif_rotation: false + auto_rotate: false # [Optional, Default: assets] # The base directory where assets are stored. This is used to determine the @@ -139,7 +139,7 @@ You will need to create a template in order to use the `responsive_image` tag. B #### Responsive image with `srcset` where the largest resized image is the default > **Note:** This is useful if you don't want your originals to appear on your site. For example, if you're uploading full-res images directly from a device. - + ```twig {% capture srcset %} {% for i in resized %} diff --git a/lib/jekyll-responsive-image/resize_handler.rb b/lib/jekyll-responsive-image/resize_handler.rb index 35fbb68..d1bb383 100644 --- a/lib/jekyll-responsive-image/resize_handler.rb +++ b/lib/jekyll-responsive-image/resize_handler.rb @@ -4,7 +4,8 @@ module Jekyll include ResponsiveImage::Utils def resize_image(img, config) - img.auto_orient! if config['respect_exif_rotation'] + img.auto_orient! if config['auto_rotate'] + resized = [] config['sizes'].each do |size|