Page 1 of 1

Get and use uploads_path in a template

Posted: Wed Nov 26, 2025 4:22 pm
by webform
Is it possible to get and use the uploads_path (/var/www/domain.com/uploads) in a template or do i need to hard code it?

I'm trying to use getimagesize($item->image) in a template but I can't use {uploads_url} as i get no output. If i hardcode the uploads_path instead i get a result for getimagesize.

Re: Get and use uploads_path in a template

Posted: Wed Nov 26, 2025 5:09 pm
by DIGI3
I'm guessing this is LISE, if you look at the default templates they use ->GetImagePath(true), which you could probably adapt.

If you can't get that to work, you can always brute force it:
{$myimagepath = "{uploads_url}/{$item->image}"}
getimagesize($myimagepath)