Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.5.5版本微信分享小程序,iOS依然会出现无法显示缩略图(jpg格式会出现,png发现能正常显示),安卓能正常显示 #610

Open
vincentpeng335143003 opened this issue Apr 10, 2024 · 3 comments

Comments

@vincentpeng335143003
Copy link

vincentpeng335143003 commented Apr 10, 2024

fluwx4.5.5最新版本,进行微信分享小程序

thumbnail:http://img.qyjpay.cn/upload//upload-bucket/aq_retail/20230601/10331/1685584949.jpg
(分享到微信后,微信对话框界面无法显示图片)
thumbnail:https://img.qhypay.cn/upload//apply-retail-bucket/aq_retail/20231222//1703227727.png
(分享到微信后,微信对话框界面可以显示图片)
await _fluwx.share(wechat.WeChatShareMiniProgramModel(
webPageUrl: webPageUrl,title: title, ///username就是小程序的id
userName: "testid",miniProgramType: type,path: path,
thumbnail: WeChatImage.network(thumbnail)));

@JarvanMo
Copy link
Member

读读微信官方问题,或者搜搜是不是只支持png

@vincentpeng335143003
Copy link
Author

读读微信官方问题,或者搜搜是不是只支持png

官方没有说是否只支持png,网上搜的话以前也有人遇到此问题,但看答案也没方法,有的说jpg能显示,png不能显示,每个人的情况不一样,没有具体办法。
对于小程序分享到朋友圈或朋友时图片无法显示的问题,有以下几种可能:

防盗链设置不完整:确保你在小程序的服务器上设置了正确的防盗链配置。防盗链配置可以防止其他网站或应用程序直接引用你的图片。
图片链接问题:确保你在分享到朋友圈或朋友时使用的图片链接是正确的,并且可以在外部环境中正常访问。可以尝试通过浏览器打开分享的链接来确认图片是否能够正常显示。
图片格式问题:检查图片的格式是否被支持。某些应用程序可能不支持某些图片格式,例如WebP格式。
服务器访问限制:如果你的服务器对外部访问进行了限制,可能导致图片无法在朋友圈或朋友中显示。确保你的服务器允许外部访问。

@vincentpeng335143003
Copy link
Author

今天发现了问题,问题不是格式问题,是返回的图片是http的,需要https才会显示。所以这边将http转成了https就可以了。折腾了几天,最后才发现是这个问题。这个帖子留着给其他人参考下!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants