Browse Source

Detect image in name

Andrew Kane 8 years ago
parent
commit
09ee7b6b9e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/helpers/blazer/base_helper.rb

+ 1 - 1
app/helpers/blazer/base_helper.rb

@@ -16,7 +16,7 @@ module Blazer
         number_with_delimiter(value)
       elsif value =~ BLAZER_URL_REGEX
         # see if image or link
-        if Blazer.images && BLAZER_IMAGE_EXT.include?(value.split(".").last.split("?").first.try(:downcase))
+        if Blazer.images && (key.include?("image") || BLAZER_IMAGE_EXT.include?(value.split(".").last.split("?").first.try(:downcase)))
           link_to value, target: "_blank" do
             image_tag value, referrerpolicy: "no-referrer"
           end