WordPress: Solution to automatically crop large uploaded images to 2560 pixels

888u

Last update at :2024-06-16,Edit by888u

I wrote a long image article yesterday and found that WordPress automatic cropping will scale the uploaded large image (more than 2560 pixels) to a size of 2560 pixels, and add -scaledWords.

This is very annoying. Originally, Brother Jin would set the aspect ratio, resolution, and file size before uploading the image, but all the efforts were in vain. The solution is as follows:

Open the current theme function file functions.php and add the following content to it:

//Solution to automatically crop large images uploaded to WordPress to 2560 pixels - https://www.zjcp.org/23514.html
add_filter( 'big_image_size_threshold', '__return_false' );

Save and refresh the webpage to upload the large image normally!

Recommended site searches: ip online agent, webmaster ip, Hong Kong vps host rental, domain name registration number query, mainland China domain name, domain name query network, Beijing domain name registration, free US host, foreign server rental price, domain name transaction, < /p>

WordPress: Solution to automatically crop large uploaded images to 2560 pixels

All copyrights belong to 888u unless special state
取消
微信二维码
微信二维码
支付宝二维码