• Resolved giannis4

    (@giannis4)


    Hi,

    Thank you for the great plugin!

    I removed a few thumbnail sizes from my website and used your plugin to remove all the no longer used thumbnails.

    That worked on my local machine but not on the live website. After a closer inspection of its code, I noticed that the $file_info used on line 546 of class-forceregeneratethumbnails.php is not previously set. That made the code not delete any images by skipping the unlink action.

    The problem was sorted after I added

    $file_info = pathinfo( $image_fullpath );

    before the

    $thumb_fullpath = trailingslashit( $file_info['dirname'] ) . wp_basename( $size_data['file'] );
    

    Please have a look.

    Best regards,
    Giannis

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nosilver4u

    (@nosilver4u)

    Hey, good catch! I think thumbs might normally be caught in the directory scan afterwards, after $file_info is defined–trying to figure out how/why I never caught that before. But the plugin definitely needs to have that defined sooner to make sure it is operating as intended, in cases where an image has been edited or when the thumbs don’t match the expected naming scheme for whatever reason.

    Thread Starter giannis4

    (@giannis4)

    Hi @nosilver4u,

    Thank you for your reply! I am glad that I could help.

    Having the folder scan might be the reason why it worked locally and not on my client’s production site.

    Thanks again for the great plugin.

    Best regards,
    Giannis

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