def sf_check_img_ext(images, allowed = [])
      allowed ||= []
      if images.is_a?(String)
        images = images.split
      elsif !images.is_a?(Array)
        images = []
      end
      images.select { |i| i =~ sf_regex(:image, allowed) }
    end
def sf_check_img_ext(images, allowed = [])
      allowed ||= []
      if images.is_a?(String)
        images = images.split
      elsif !images.is_a?(Array)
        images = []
      end
      images.select { |i| i =~ sf_regex(:image, allowed) }
    end
Filter images returning those with the allowed extentions.

 Example:
   >> sf_check_img_ext('http://source.com/image.gif', :jpg)
   => []
   >> sf_check_img_ext(
        ['http://source.com/image.gif','http://source.com/image.jpg'],
        [:jpg, :png]
      )
   => ['http://source.com/image.jpg']
 Arguments:
   images: (String or Array)
     - Images which will be checked.
   allowed: (String, Symbol or Array)
     - Allowed types of image extension.