Discuz!X3.4手机版上传原图,不压缩图片
打开:static/js/mobile/buildfileupload.js删除下边代码,后台和浏览器更新缓存即可if(imgwidth/imgheight <= canvaswidth/canvasheight && imgheight >= canvasheight) { newheight = canvasheight; newwidth = Math.ceil(canvasheight/imgheight*imgwidth);} else if(imgwidth/imgheight > canvaswidth/canvasheight && imgwidth >= canvaswidth) { newwidth = canvaswidth; newheight = Math.ceil(canvaswidth/imgwidth*imgheight);}
注意,手机图片像素大,GD库可以无法处理导致上传失败,所以,可以考虑提高最大高度和宽度的限制,而不一定传原图,教程如下(未进行上边的删除的情况下)
打开:static/js/mobile/buildfileupload.js
找到
var maxheight = 500;var maxwidth = 500;调大数字
页:
[1]