diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 196105f011900ea89b815e6d751166c9df8510c2..f640d5647ffb250830413b9fc8e1ffc4139290a3 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -160,7 +160,8 @@ module ApplicationHelper end def image_url(source) - root_url + path_to_image(source) + # prevent relative_root_path being added twice (it's part of root_url and path_to_image) + root_url.sub(/#{root_path}$/, path_to_image(source)) end alias_method :url_to_image, :image_url end