问题:
今天上传一张图片到wp的时候,出现了下面的提示:
从字面上看,意思是图片的分辨率最大最好是2500pixels,即上传的图片超过了这个限制!!
通过谷歌,找到了解决办法
解决:
修改wp-admin/includes/image.php文件,记得备份下,添加一下内容:
Usage examples:
1
2
3
4
5
6
7
8
|
// completely disable image size threshold add_filter( 'big_image_size_threshold' , '__return_false' ); // increase the image size threshold to 4000px function mynamespace_big_image_size_threshold( $threshold ) { return 4000; // new threshold } add_filter( 'big_image_size_threshold' , 'mynamespace_big_image_size_threshold' , 999, 1); |
参考:https://developer.wordpress.org/reference/hooks/big_image_size_threshold/
记录一次无法上传高分辨率图片