def image_tag(source, options = {})
options.symbolize_keys!
src = options[:src] = path_to_image(source)
unless src =~ /^(?:cid|data):/ || src.blank?
options[:alt] = options.fetch(:alt){ image_alt(src) }
end
if size = options.delete(:size)
options[:width], options[:height] = size.split("x") if size =~ %r{^\d+x\d+$}
end
if mouseover = options.delete(:mouseover)
ActiveSupport::Deprecation.warn ":mouseover option is deprecated and will be removed from Rails 4.0"
options[:onmouseover] = "this.src='#{path_to_image(mouseover)}'"
options[:onmouseout] = "this.src='#{src}'"
end
tag("img", options)
end