When uploading large images (e.g., those with dimensions exceeding 7500 pixels), the system doesn’t automatically crop them to the custom size of 2400 pixels using the following code:
<?php
add_image_size('custom_size_2400', 2400);
Additionally, there are no restrictions on uploading images of any resolution. Currently, to achieve the desired size, you must manually crop the image to a smaller size before it will resize correctly.
To address this, there should be a setting that automatically converts the uploaded image to the maximum allowed size, after which it will resize according to the specified dimensions.
2
Answers
Since 5.3, WP has a limit of 2560 pixels in either direction, images above that size will not be processed by default. foliovision.com/2021/11/full-size-images-wordpress –
Worked below code. Thanks @C3roe
The easiest solution, I also use it, is here. https://www.dropzone.dev/
html
php code if you want to connect with mysql