Reputation: 395
I have WordPress 6.5.2, "Code Snippets" plugin 3.6.4 installed and following snippet code:
add_filter( 'big_image_size_threshold', '__return_false' );
but it does not work, WordPress still complains on failing 2560 in the web site admin interface limit threshold from ./wp-admin/includes/image.php
:
$threshold = (int) apply_filters( 'big_image_size_threshold', 2560, $imagesize, $file, $attachment_id );
Also tried the snippet:
// Increase the image size threshold to 4096px
function mydomain_big_image_size_threshold($threshold) {
return 4096; // new threshold
}
add_filter('big_image_size_threshold', 'mydomain_big_image_size_threshold', 999, 1);
same result, error.
Tried page reloading, PHP FPM and Nginx restarting - still same error.
Could anybody please help with it?
Upvotes: 0
Views: 48
Reputation: 395
Fixed, issue was not in Wordpress, I've added the line client_max_body_size 8M;
to server
block of Nginx site config file.
Upvotes: 0