• Are there any limitations with image sizes? I have an image size that’s 1920x600px (for page headers.)

    I’ve noticed that if my uploaded image is more than 4000px wide, I cannot crop that image size. I can crop thumbnails and other sizes, but the 1920×600 image size has a red crop icon in the lower right corner. Which seems to indicate that the image cannot be cropped.

    Any ideas?

    Thanks.

Viewing 6 replies - 16 through 21 (of 21 total)
  • Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    What is the original image size (exact) of the image (from the debug above)?

    7952×5304

    Correction:

    The dimensions are 7151 by 4773 pixels

    Plugin Author Volkmar Kantor

    (@volkmar-kantor)

    Ok,
    hmm – i tried on an similar system (PHP 7.2, Image Magic Engine, 256M) with no problem. The one thing, that is different is the “Image filename has changed (blog-wide)” in the Data-Debug.

    Can you provide the JS-Debug-data (turn on in plugins-settings). You may obscure you serverpathes.

    JS-Debug-Data can be found in the Crop-Dialog – they will contain all settings off the current selected image, and look like this:

    
    cropImage:{
      "url": "  ------  /uploads/2019/10/crop-thumbnails-test-2-768x513.jpg",
      "width": 768,
      "height": 513,
      "gcd": "3",
      "ratio": 1.4970760233918128,
      "printRatio": "256:171",
      "image_size": "medium_large"
    }
    cropData:{
      "options": {
        "debug_js": 1,
    
    [...]
    

    Also, i generaly can not recommend to use this big files. A simple solution for the problem is to resize the images directly after the upload. Here is a gist with the code i use for years to do the job.
    https://gist.github.com/vollyimnetz/4220b7b29be1a779017886c87672bc71

    I advised uploading images less than 5500px wide but I will give that plugin a try as a fallback.

    Here is the JS Debug output:

    cropImage:{
      "url": "example.com/wp-content/uploads/2019/02/menu-board-case-study-1024x683.jpg",
      "width": 1024,
      "height": 683,
      "gcd": "1",
      "ratio": 1.499267935578331,
      "printRatio": "1024:683",
      "image_size": "large"
    }
    cropData:{
      "options": {
        "hide_size": {
          "post": {
            "thumbnail": "1"
          },
          "page": {
            "thumbnail": "1"
          }
        },
        "debug_js": 1,
        "debug_data": 1
      },
      "sourceImageId": 8015,
      "sourceImage": {
        "full": {
          "url": "example.com/wp-content/uploads/2019/02/menu-board-case-study.jpg",
          "width": 7151,
          "height": 4773,
          "gcd": "1",
          "ratio": 1.4982191493819401,
          "printRatio": "7151:4773",
          "image_size": "full"
        },
        "large": {
          "url": "example.com/wp-content/uploads/2019/02/menu-board-case-study-1024x683.jpg",
          "width": 1024,
          "height": 683,
          "gcd": "1",
          "ratio": 1.499267935578331,
          "printRatio": "1024:683",
          "image_size": "large"
        },
        "medium_large": {
          "url": "example.com/wp-content/uploads/2019/02/menu-board-case-study.jpg",
          "width": 768,
          "height": 513,
          "gcd": "3",
          "ratio": 1.4970760233918128,
          "printRatio": "256:171",
          "image_size": "medium_large"
        }
      },
      "sourceImageMeta": {
        "aperture": "0",
        "credit": "",
        "camera": "",
        "caption": "",
        "created_timestamp": "1466781129",
        "copyright": "JENN INKOL",
        "focal_length": "0",
        "iso": "0",
        "shutter_speed": "0",
        "title": "",
        "orientation": "1",
        "keywords": []
      },
      "postTypeFilter": null,
      "imageSizes": [
        {
          "name": "thumbnail",
          "nameLabel": "thumbnail",
          "url": "example.com/wp-content/uploads/2019/02/menu-board-case-study-150x150.jpg",
          "width": 150,
          "height": 150,
          "gcd": "150",
          "ratio": 1,
          "printRatio": "1:1",
          "hideByPostType": false,
          "crop": true,
          "active": false,
          "lowResWarning": false,
          "cacheBreak": 1571778730321
        },
        {
          "name": "blog-wide",
          "nameLabel": "blog-wide",
          "url": "example.com/wp-content/uploads/2019/02/menu-board-case-study.jpg",
          "width": 2650,
          "height": 900,
          "gcd": "50",
          "ratio": 2.9444444444444446,
          "printRatio": "53:18",
          "hideByPostType": false,
          "crop": true,
          "active": true,
          "lowResWarning": false,
          "cacheBreak": 1571778730321
        },
        {
          "name": "blog-wide-small",
          "nameLabel": "blog-wide-small",
          "url": "example.com/wp-content/uploads/2019/02/menu-board-case-study.jpg",
          "width": 1440,
          "height": 490,
          "gcd": "10",
          "ratio": 2.938775510204082,
          "printRatio": "144:49",
          "hideByPostType": false,
          "crop": true,
          "active": false,
          "lowResWarning": false,
          "cacheBreak": 1571778730321
        },
        {
          "name": "blog-index-small",
          "nameLabel": "blog-index-small",
          "url": "example.com/wp-content/uploads/2019/02/menu-board-case-study-562x319.jpg",
          "width": 562,
          "height": 319,
          "gcd": "1",
          "ratio": 1.761755485893417,
          "printRatio": "562:319",
          "hideByPostType": false,
          "crop": true,
          "active": false,
          "lowResWarning": false,
          "cacheBreak": 1571778730321
        },
        {
          "name": "blog-index-large",
          "nameLabel": "blog-index-large",
          "url": "example.com/wp-content/uploads/2019/02/menu-board-case-study-814x462.jpg",
          "width": 814,
          "height": 462,
          "gcd": "22",
          "ratio": 1.7619047619047619,
          "printRatio": "37:21",
          "hideByPostType": false,
          "crop": true,
          "active": false,
          "lowResWarning": false,
          "cacheBreak": 1571778730321
        }
      ],
      "lang": {
        "warningOriginalToSmall": "Warning: the original image is too small to be cropped in good quality with this thumbnail size.",
        "cropDisabled": "Cropping is disabled for this post-type.",
        "waiting": "Please wait until the images are cropped.",
        "rawImage": "Raw",
        "pixel": "pixel",
        "instructions_header": "Quick Instructions",
        "instructions_step_1": "Step 1: Choose an image-size from the list.",
        "instructions_step_2": "Step 2: Change the selection of the image above.",
        "instructions_step_3": "Step 3: Click on \"Save Crop\".",
        "label_crop": "Save Crop",
        "label_same_ratio": "Crop all images with same ratio at once",
        "label_deselect_all": "deselect all",
        "dimensions": "Dimensions:",
        "ratio": "Ratio:",
        "cropped": "cropped",
        "lowResWarning": "Original image size too small for good crop quality!",
        "notYetCropped": "Not yet cropped by wordpress.",
        "message_image_orientation": "This image has an image orientation value in its exif-metadata. Be aware that this may result in rotatated or mirrored images on safari ipad / iphone.",
        "script_connection_error": "The plugin can not correctly connect to the server.",
        "noPermission": "You are not permitted to crop the thumbnails."
      },
      "hiddenOnPostType": false
    }

    I added the plugin ‘resize on upload’ and all seems good now. I still would like to know the root cause of the error though.

    If we talk about plugin called “resize-on-upload”, as shown in the link below…than:

    It does what it says very easy…It resize the image-upload just to the size you want.
    And does the work perfect.

    Using this old plug since years….it’s not updated…so it will first put same warnings.

    just change a few details in resize-on-upload.php
    It is the same script as seen here:
    https://github.com/rtgibbons/bya.org/blob/master/wp-content/plugins/resize-on-upload/resize-on-upload.php

    line 37 replace with:
    public static function add_config_page() {

    line 45 replace with:
    public static function config_page() {

    and finally line 40 replace with:
    add_options_page(‘Resize-on-Upload Configuration’, ‘Resize-on-Upload’, ‘delete_users’, basename(__FILE__), array(‘ROU_Admin’,’config_page’));

    and now it’s ready vor php 7.2 and further….

    enjoy!

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘Image Size Limitations’ is closed to new replies.