Force Regenerate Thumbnails
[resolved] Thumbnails not deleted (7 posts)

  1. toojee
    Posted 2 years ago #


    I have a problem with the plugin, I use this :
    add_image_size( "work", 520, 340, true );

    I upload image then i change value of width like that:
    add_image_size( "work", 529, 340, true );

    I start Force Regenerate Thumbnail on the image in medias menus. All thumbnails are regenerated but the thumbnail - 520x340 wasn't deleted!

    Your plugin do normaly that, right? That the difference with the regular Regenerate Thumbnail?


  2. Pedro Elsner
    Plugin Author

    Posted 2 years ago #

    Hello @toojee
    Check the permissions of the upload folder. All old thumbnails MUST be deleted!

  3. toojee
    Posted 2 years ago #

    Its in local with wamp, so I have all the permissions. When i delete this image by wordpress, all thumbnails are delete except the 520x340, because I changed this in add_image_size.

    With the plugin, I have this success message:
    1 "image-test" (ID 286): All thumbnails was successfully regenerated in 0,525 seconds.
    That's all.

    I have no deleted message like this : "Thumbnail: 150x150 was deleted." or failed message

    Thanks for your response.

  4. toojee
    Posted 2 years ago #

    Hi, i look at the code php this week end, and i figured out why doesn't work.
    On line 458, when I do a :
    $message .= '<br />'.$dirPath;

    I see c:\wamp\myproject\ instead of c:\wamp\myproject\bin\wp-content\uploads\

    So in line 464, it search in wrong directory to delete files. And $imageName is egual to "bin/wp-content/uploads/2012/12/my-file-"

    I think its a DIRECTORY_SEPARATOR problem because I have 2 of them / and \

  5. Pedro Elsner
    Plugin Author

    Posted 2 years ago #

    The DIRECTORY_SEPARATOR is set in your web-server on PHP config.

    - Unix/Linux system use '/'
    - Windows system use '\'

    Please, check your web-service PHP config and change de DIRECTORY_SEPARATOR to '\'.

    See: http://php.net/manual/en/dir.constants.php

  6. toojee
    Posted 2 years ago #

    I don't find how change DIRECTORY_SEPARATOR so I add a line to the plugin line 419 :

    $fullsizepath = strtr($fullsizepath, '/', '\\');

    And its work fine, I will use the untouched plugin for production

  7. Pedro Elsner
    Plugin Author

    Posted 2 years ago #

    Maybe, you can change the DIRECTORY_SEPARATOR on php.ini

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Force Regenerate Thumbnails
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic