added the var parameter for the image smarty function