Merge pull request #660 from bitgangsta/fix_svg
Fixing automatic_image_sizes to eliminate warnings on vector images
This commit is contained in:
commit
3f1fa496b2
1 changed files with 5 additions and 1 deletions
|
@ -30,7 +30,11 @@ module Middleman
|
|||
# @param [Hash] params
|
||||
# @return [String]
|
||||
def image_tag(path, params={})
|
||||
if !params.has_key?(:width) && !params.has_key?(:height) && !path.include?("://")
|
||||
params[:supported_extensions] ||= %w(.png .jpg .jpeg .bmp .gif)
|
||||
|
||||
if !params.has_key?(:width) && !params.has_key?(:height) && !path.include?("://") &&
|
||||
params[:supported_extensions].include?(File.extname(path).downcase)
|
||||
|
||||
params[:alt] ||= ""
|
||||
|
||||
real_path = path
|
||||
|
|
Loading…
Reference in a new issue