My images are saved in folder


But to make this future save i dont want to hardwire the path? Is there a drupal function to get the images in a proper way? I played around with


But i just need the default dir to pass it to javascript, I dont have image uris yet...

Thanks a lot!


I'm not sure this will get you exactly what you want, but the 'default' path is just public://, so.

$url = image_style_url('large', 'public://');

will return


I think it's more likely you're looking for a specific path, e.g.

$url = image_style_url('large', 'public://field/image');

which returns


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.