Discuz!X3.4手机版上传原图,不压缩图片
打开:static/js/mobile/buildfileupload.js删除下边代码,后台和浏览器更新缓存即可if(imgwidth/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;调大数字 感谢教程,原图是太大了,能像后台一样设置压缩比最好 太感谢了,最近也遇到这个问题。 感谢…… 3.5也是,删了代码也没解决 @dashen 每太看懂,请问这个改动目的是压缩原图还是不压缩原图
页:
[1]