If WeChat Mini Programs's picture is not set in height, it will flash and pull for a long time when it is loaded for the first time.

I set the width of the picture, and then set the mode= "widthfix", but I found that on some phones, the moment when I first enter the page to load the image, the picture will be pulled very long, and then return to normal. Then if I set the height of the picture to rpx, this would not happen. Because I am used to the highly adaptive writing method of setting only the width of the picture in h5 development, I asked if Mini Program needs to set the height of the picture

.

seems to improve a little bit by setting a global image {height:auto}.


have you tried using aspectFit?

Menu