Home >WeChat Applet >Mini Program Development >How to solve the problem that real device pictures are not displayed in the WeChat applet
How to solve the problem that the WeChat applet real machine pictures are not displayed
: During the real machine test, it was found that some local pictures can be displayed on the development tool , but it cannot be displayed when previewing on the real machine
The code is written like this
<view class='seat-size' wx:for="{{item}}" wx:key="index" wx:for-index="index" wx:for-item="citem"> <image src='../../../images/seaticon.png' class='seat-img' /> </view>
Cause and solution: The path written like this is not recognized on the real machine and needs to be written relative to the root directory
<image src='/images/seaticon.png' class='seat-img' />
Recommended learning: Small program development
Other solutions:
If it is not a path problem , there are several other ways to find the problem:
1. The picture is loaded using image;
2. There is no Chinese in the URL of the picture;
3. HTTP should be lowercase http and the suffix of the picture should be lowercase .png or .jpg
4. The domain name has been registered;
5. The picture name has no spaces
PHP Chinese Internet, a large number of MySQL video tutorials, welcome to learn!
The above is the detailed content of How to solve the problem that real device pictures are not displayed in the WeChat applet. For more information, please follow other related articles on the PHP Chinese website!