• 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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    If you have SFTP access to your website, could you log in and check for the image size there? File/folder structure should look something like wp-content/uploads/2024/08/ and then in it you should have:
    large_image.webp
    large_image-2400xsomething.webp
    large_image-500×500.webp… or something similar. Do these exist?

    When you use add_image_size, you need to call that size in your theme to display that size.

    Thread Starter Mahesh Thorat

    (@maheshmthorat)

    @zex2911, thanks for your reply. I’ve added the size as discussed. I also mentioned that variations are not generated if the uploaded image exceeds 7500 pixels. Do you have any insights on this?

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.