I have a react component where I show an image using img tag ----> <img src={url} className="avatar"></img>
The component gets mounted when I click a specific button and gets unmounted when I click someplace else (Basically it works like a popover). So the issue is that whenever this component is mounted, the image from the url is downloaded again, not used from cache.
Q1: So what modifications do I need to load it from cache?
Q2: Do I need to write a caching mechanism to achieve this?