Http pictures are not displayed in the https site

has any Daniel solved the problem of display compatibility of http image resources in https websites in various mobile browsers? Specifically, some Android models, such as Huawei, vivo"s native webview can not display http image resources on https sites, and most third-party browsers are fine.


pictures are represented in the form / / . For example: / / img.aliyun.2.png . Changes will be made automatically according to the current domain name agreement.


you can solve
.replace (/ http/g, "https");


I am a porter. I happen to have the same problem in the past two days. The
page end provides the Android client with a URL address of Https, and the
page side normally loads images in all major PCweb, browsers.
however, in conjunction with the business side, it is found that 4. version is normal, 6. version is not normal
later various troubleshooting and positioning (it took more than half a day), grabbing the package and finding that the image has been uploaded to the back-end file server. And has also responded to the picture address.
at the end of the page is . At first, it was suspected that it was the attribute of img, there was no height width, etc.
until just to the same page, loading https images, http pictures, I found that the Https link loaded http images incorrectly.

Baidu immediately:

sure enough, there are a lot of problems. It seems that the upgrade of android os leads to the change of some loading policies of webview, which leads to
http://www.jianshu.com/p/59c0.
http://blog.csdn.net/lxk_1993.
http://blog.csdn.net/u0138067.


just kill the protocol. For example, the address where you reference the image resource is http://example.com/img.png to / / example.com/img.png. Try it.

Menu