1
0
Fork 0
mirror of https://github.com/middleman/middleman.git synced 2022-11-09 12:20:27 -05:00

no reason for image sizes to touch the alt attr

This commit is contained in:
Thomas Reynolds 2014-08-22 09:36:07 -07:00
parent 0d2bcbabe9
commit 18825e7ced

View file

@ -16,8 +16,6 @@ class Middleman::Extensions::AutomaticImageSizes < ::Middleman::Extension
# @return [String] # @return [String]
def image_tag(path, params={}) def image_tag(path, params={})
if !params.key?(:width) && !params.key?(:height) && !path.include?('://') if !params.key?(:width) && !params.key?(:height) && !path.include?('://')
params[:alt] ||= ''
real_path = path real_path = path
real_path = File.join(images_dir, real_path) unless real_path.start_with?('/') real_path = File.join(images_dir, real_path) unless real_path.start_with?('/')
full_path = File.join(source_dir, real_path) full_path = File.join(source_dir, real_path)