CP and diabetes mellitus: DTI-ALPS and CP volume mediated the effect of white matter hyperintensities and diabetes duration on dementia.<h4>Discussion</h4>Impaired CSF dynamics may lead to dementia and partially mediate cardiovascular risk-dementia associations.<h4>Highlights</h4>We developed fully automated methods for quantifying diffusion tensor image analysis along the perivascular space (DTI-ALPS) and blood oxygen level-dependent cerebrospinal fluid (BOLD-CSF) coupling.