Option 1:
You can display the image as blob, like this:
var location = 'https://images.unsplash.com/photo-1474511320723-9a56873867b5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80';
fetch(location).then(response => response.blob()).then(blob => {
var url = URL.createObjectURL(blob);
var image = document.createElement('img');
image.src = url;
document.body.appendChild(image);
// your url will look like this:
// blob:https://example.com/f347bbac-af35-40a8-ac2b-daf639faf2db
// this url cannot be used on another domain
console.log(url);
});
Option 2:
Move all of the images to the place that cannot be accessed directly. After signing in, whenever you need to display an image, just make a request to server. Then, server will return a file for the request.
Your_project
|_ wwwroot (public)
|_ Your image folder (private)
|__ folder01
|____ image01.png
|____ image02.png
Reference: Returning a file to View/Download in ASP.NET MVC