3

WordPress is amazing and I am a very big fan of it.

But the version 5.3 brought me (an many others, 1, 2, 3, 4...) a big problem with its new forced feature for auto-scaling down big images.

I am trying to disable it (because I do not need/want it and because it is not working) with the following filter:

add_filter( 'big_image_size_threshold', '__return_false' ); 

Where the callback function __return_false() is just a WordPress wrapper function to return false.

But it is not working, I still get an error, which means the feature is not disabled.

Same happens with the recommended plugin. It's not fixing the error.

What error?: Postprocessing failed, please scale your image under 2500px.

I did clean the browser cache, set PHP version to 7.2 and activated mbstring (as suggested by others regarding the same problem).

The error happens for some uploads, not for all of them:

And it has nothing to do with uploading big images.

Here are a few facts describing the issue:

  • I am doing random screenshots of random areas (means random sizes).
  • I am always doing small rectangles (max 800px x 400px)
  • Some images will upload fine.
  • Other images will not.
  • But the specific images that work always work if I retry uploading several times.
  • And the specific images that don't always don't if I retry uploading several times (even when renamig the file).
  • can you share one or two of the images that worked, and one or two of the images that did not? – Caleb Apr 26 at 20:18
  • note: took a look at the code in WP core, and did notice that PNGs are excluded from the threshold. – Caleb Apr 26 at 20:21
  • Dear @Caleb, the images I used for testing where random screenshots with the Windows X native screenshots tool. I deleted those images after doing the tests. But anyway, now everything works fine again with the latest WP version. – Alvaro Franz Apr 27 at 10:38
0

I have the same issue with not being able to turn off big_image_size_threshold (one of the worst new features WordPress has ever put out) for kicks I tried removing the quotes around return false but it doesn't resolve the issue. The example in Codex does in fact show quotes. https://codex.wordpress.org/Function_Reference/_return_false

I have opened a ticket in core tracker for this, possible bug.

| improve this answer | |
  • what’s the link to the ticket you submitted? – Caleb Apr 26 at 20:08
  • I'm still not seeing this issue as resolved. I have the disable code in my functions.php file and I just tested this again today 4/27/2020 - I uploaded a 3600 px wide image and it created both a 1536 and a 2048 image on my server. – Pitchpole Apr 27 at 22:15
  • what's the link to the ticket in core tracker? – Caleb May 7 at 15:06
0

Now it is working as expected (disabled scaling), under the following settings:

In my theme functions.php

add_filter( 'big_image_size_threshold', '__return_false' );

In the WP Media Settings:

enter image description here

| improve this answer | |
-1

You need to remove the quotes around '__return_false'.

<?php
// Remove the quotes around __return_false
add_filter( 'big_image_size_threshold', __return_false); 

You are giving the function a string, hence the filter is not executing.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.