I am using a specific API that has an agreement with the image url:
https://us.battle.net/static-render/us/illidan/249/96749817-avatar.jpg?alt=wow/static/images/2d/avatar/6-0.jpg
(How this URL received is not relevant to the question, so I will not explain). But basically, the server will be redirected to an alternative thumbnail if the exact image is not found. The problem is that the server redirects to http when redirecting, even if the original call is made through https . My page using these URLs uses https , so I get warnings.
Is there an easy way in javascript / html that I can use https urls even if the server is redirected to http ? Please visit the above URL to understand what I mean. Perhaps one option is to download via javascript and intercept the redirect, change the protocol to https, etc., but it looks a bit complicated.
As a test code, just an html page with the code below is enough (you need to download it via https to see the problem):
<html> <head>...</head> <body> <img src='https://us.battle.net/static-render/us/illidan/249/96749817-avatar.jpg?alt=wow/static/images/2d/avatar/6-0.jpg'> </body> </html>
source share