I try to add an image to madia library. I get this message: maximum file size is 2 bytes. What can I do ?
@Petru - In the admin area, if you go to Media > Add New, at the bottom of the screen does it report there also that the maximum upload size is 2 bytes?
There may be a plugin or theme changing the default size allowed or it can be your hosting provider.
You can look for a plugin that is causing this by deactivating them or maybe adding your own:
add_filter( 'upload_size_limit', 'filter_site_upload_size_limit', 20 );
function filter_site_upload_size_limit( $size ) {
// set upload size to 10Mb
$size = 10000 * 1024;
return $size;
}
Or maybe adding the following in your wp-config.php file:
@ini_set( 'upload_max_size', '256M');
@ini_set( 'post_max_size', '256M');
1 Like
That solution worked. I use the-classicprese-theme
1 Like
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.