[wp-trac] [WordPress Trac] #54912: Image size limit is a bug not a feature
WordPress Trac
noreply at wordpress.org
Wed Jan 26 08:07:21 UTC 2022
#54912: Image size limit is a bug not a feature
-------------------------+----------------------
Reporter: jonfr2100 | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Gallery | Version: 5.9
Severity: normal | Resolution: invalid
Keywords: | Focuses:
-------------------------+----------------------
Changes (by costdev):
* keywords: needs-patch =>
* status: new => closed
* type: defect (bug) => enhancement
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
Hi @jonfr2100!
There are indeed ways to modify or remove this threshold.
**Option 1**
- There are [https://wordpress.org/plugins/search/disable+image+threshold/
a number of plugins] available that will remove the threshold.
**Option 2**
1. Save the following to`wp-
content/plugins/remove_image_threshold/remove_image_threshold.php` (note
the comments - use either the line or the block, not both).
{{{#!php
<?php
/**
* Plugin Name: Change image threshold
*/
// Add this line to remove the threshold altogether.
add_filter( 'big_image_size_threshold', '__return_false', 999 );
// OR Add this block to change the threshold to 4000.
add_filter(
'big_image_size_threshold',
function( $threshold ) {
return 4000;
},
999
);
}}}
2. Navigate to `Plugins > Installed Plugins` and activate "Remove image
threshold".
**Option 3**
- Add the following to your theme's functions.php file:
{{{#!php
add_filter( 'big_image_size_threshold', '__return_false', 999 );
}}}
Once you have done one of the three options above, you can upload larger
images to your website (assuming they are within the file size limit) and
selecting "Full Size" in the editor will load the original file.
**Note:**
- The image may not ''display'' at the full size if the website's styling
limits this.
- However, it ''will'' load the original file. You can verify this by
right-clicking and selecting "Open image in new tab", or by linking the
image to "Media File".
I'll close this ticket as the requested enhancement is indeed already
available.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54912#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list