Fixes #6405 We need to take into account both the totalCount of **before cursor** results and **after cursor** results.
getImageAbsoluteURIOrBase64