'Image url works fine as a link but as an img src gets redirected for authentication

I have a flask app, I'm getting a CORB error in the console when trying to load the picture on a page and seems like the img src url is getting redirected(302) to a login page. Is there a way to create a session with the external server, so it doesn't require authentication every time I'm loading a page. Or maybe an AJAX call in the background just taking care of the authentication and display the images throughout the app



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source