lib/middleman-simple-thumbnailer/extension.rb in middleman-simple-thumbnailer-1.0.1 vs lib/middleman-simple-thumbnailer/extension.rb in middleman-simple-thumbnailer-1.0.2
- old
+ new
@@ -28,11 +28,10 @@
def image_tag(path, options={})
resize_to = options.delete(:resize_to)
return super(path, options) unless resize_to
- image = MiddlemanSimpleThumbnailer::Image.new(path, self.config)
- image.resize!(resize_to)
+ image = MiddlemanSimpleThumbnailer::Image.new(path, resize_to, self.config)
if environment == :development
super("data:#{image.mime_type};base64,#{image.base64_data}", options)
else
super(image.resized_img_path, options)
end
\ No newline at end of file