Hello
I'm trying to display a little image in drupal_set_message
Because of multilanguage use when I do
$image_path=url('sites/default/files/Sieste2.gif',array('absolute'=>true));
I get :
http://www...com/en/sites/default/files/Sieste2.gif
when english language is selected.
Of course my image hasn't moved... So it's not displayed...
How can I set an 'absolute-hardware', without en/, path for my images ?

Comments

webflo’s picture

Status: Active » Fixed

Try file_create_url.

  $image_path = file_create_url('Sieste2.gif');
artatum’s picture

Status: Fixed » Closed (fixed)

Thx for your help.
I've tried but this doesn't fit : the url() function always give me the en/
In fact I've rebuild programmaticaly my Url, using $base_url then checking langage, removing it from url and paste my image path after.
It's killing a fly with an Atomic Bomb but it works in every language.