Storing API image in localStorage, avoiding calling API everytime a new tab is opened