Support » Plugin: Bulk Resize Media » Image can't be viewed from Media after resized

  • Dear Sir/Madam,

    Not sure whether there is some bug running on WP 4.3.1.

    I have image with size larger than 1024 width, I set the max height and width to 1024, after the Bulk Resize resized the images, no matter I view the Media in list or grid mode, I can see the image in list but when I click into the image and see the details, the image gone. I check with the Inspector and find the source file is linked to the filename-1024×768.jpg but I can’t find this file from server on the same folder.

    Best regards,

    Kelvin.

    https://wordpress.org/plugins/bulk-resize-media/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Jordan

    (@jordanbowness)

    I’m experiencing this as well. It appears that the bulk resizer plugin messes up the naming logic with thumbnails. Editing and saving the resized image (rotating it, for example) restores the thumbnail.

    I got this problem.

    Let’s say you have an image ‘image.jpg’ 800×1030, as the image is larger than 1024 wordpress will make a copy of the image and store it like image_780x1024.jpg (it also makes other copies for sizes small, and medium)

    When the plugin resizes the image to 780×1024, then you have two images: “image_780x1024.jpg” and the original “image.jpg” with the exact same size.

    So I think wp remove the ‘image_780x1024.jpg’ copy because is now longer needed. BUT all posts where the image is referenced are not updated.

    To solve this I restored a backup and set the max dimensions to 1025 intead of 1024. This way, as the original image keeps beeing larger than the 1024 copy, all is ok.

    Does anyone have any idea of how this should be handled?
    Have someone tested if Imsanity plugin has the same issue?

    Ok, I think the problem is here: http://plugins.svn.wordpress.org/bulk-resize-media/trunk/functions/ajax.php

    in:

    $resizeResult = image_resize( $oldPath, $newW, $newH, false, null, null, $quality);

    Function definition:

    image_resize( $file, $max_w, $max_h, $crop, $suffix, $dest_path, $jpeg_quality );

    As we passed null for the $dest_path it generates the path: ‘image_780x1024.jpg’ which in some cases already exists… (that’s the problem)

    Then we do:

    unlink($oldPath);
    rename($newPath, $oldPath);

    So the image ‘image_780x1024.jpg’ is no longer available…

    I’m testing this more deeply

    This bug is fixed in imsanity plugin:

    https://es.wordpress.org/plugins/imsanity/

    Don’t use this one anymore, because it’s just a copy of the imsanity plugin.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image can't be viewed from Media after resized’ is closed to new replies.