@社区技术运营专员-Riven
请问一下 wx.chooseMedia这个api的图片压缩为什么我好像无效?不多说直接上代码和图片 我想实现的功能很简单就是给图片压缩一下不然手机拍的太大浪费资源 [图片] 我是按照官方文档写的代码但是为什么这图片好像没压缩到 下面是我wx.chooseMedia的源代码给大家研究一下,求帮忙,图片压缩了半天没反应 wx.chooseMedia({ count: 9, mediaType: ['image'], sourceType: ['album', 'camera'], maxDuration: 30, sizeType:['compressed'], camera: 'back', success(res) { wx.getImageInfo({ src: res.tempFiles[0].tempFilePath, success: function (res) { console.log('压缩成功'); that.setData({ imgurl: res.path, imgwidth: res.width, imgheight: res.height, }) } }); // console.log(res.tempFiles[0].tempFilePath) // console.log(res.tempFiles[0].size) } });
2022-06-13