Changing default image_tag folder

Is it possible to change the default image_tag folder?

You could override image_path in ActionView::Helpers::AssetTagHelper

  def image_path(source)
    compute_public_path(source, 'folder under public you want to 

server files from’)


Hi Bourre, is not recommended you change the default path because is a
default in all rack app and in the moment of request coming to the
server for the public folder him don’t call the Rails app and if you
change you gonna change this functionality…

So is there a way to configure each app? As you can figure out i’m a
total newbie.

On 15 October 2010 16:45, Nick B. [email protected] wrote:

Is it possible to change the default image_tag folder?

Are you sure you need to do this? Can you explain the reason.

image_tag will take a full path so
image_tag “myicon.png”
will use /images/myincon.png"
image_tag “/icons/myicon.png”
will use /icons/myicon.png

Further examples at


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs