This would generally just be down to the browser. Once the path is output, XenForo has no involvement in how the image is loaded. You would need to open up your browser's development tools and look at the network section to determine whether a request is being made for the file. .htaccess (or similar) would be used to apply caching headers. If you see the image is being loaded from cache, then it may just be how the browser is loading the page.