From 6efe4756d8aeef3c93511149a2e3a58e541cbd30 Mon Sep 17 00:00:00 2001 From: Karel Picman Date: Thu, 18 Feb 2016 09:21:41 +0100 Subject: [PATCH] added feature to scale down inline images with respect to aspect ratio #508 --- init.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.rb b/init.rb index 406f9581..e3e25e8e 100644 --- a/init.rb +++ b/init.rb @@ -181,7 +181,7 @@ Redmine::Plugin.register :redmine_dmsf do end raise 'Not supported image format' unless file.image? url = url_for(:controller => :dmsf_files, :action => 'view', :id => file) - if size.include? "%" + if size && size.include?('%') image_tag(url, :alt => file.title, :width => size, :height => size) else image_tag(url, :alt => file.title, :size => size)