Title: Thumbnails not deleted
Last modified: August 20, 2016

---

# Thumbnails not deleted

 *  Resolved [toojee](https://wordpress.org/support/users/toojee/)
 * (@toojee)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/thumbnails-not-deleted/)
 * Hi!
 * 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 – 520×340 wasn’t deleted!
 * Your plugin do normaly that, right? That the difference with the regular Regenerate
   Thumbnail?
 * [http://wordpress.org/extend/plugins/force-regenerate-thumbnails/](http://wordpress.org/extend/plugins/force-regenerate-thumbnails/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Contributor [Pedro Elsner](https://wordpress.org/support/users/pedro-elsner/)
 * (@pedro-elsner)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/thumbnails-not-deleted/#post-3276266)
 * Hello [@toojee](https://wordpress.org/support/users/toojee/)
    Check the permissions
   of the upload folder. All old thumbnails MUST be deleted!
 *  Thread Starter [toojee](https://wordpress.org/support/users/toojee/)
 * (@toojee)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/thumbnails-not-deleted/#post-3276280)
 * Its in local with wamp, so I have all the permissions. When i delete this image
   by wordpress, all thumbnails are delete except the 520×340, 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: 150×150 was deleted.” or failed
   message
 * Thanks for your response.
 *  Thread Starter [toojee](https://wordpress.org/support/users/toojee/)
 * (@toojee)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/thumbnails-not-deleted/#post-3276351)
 * 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 \
 *  Plugin Contributor [Pedro Elsner](https://wordpress.org/support/users/pedro-elsner/)
 * (@pedro-elsner)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/thumbnails-not-deleted/#post-3276353)
 * 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](http://php.net/manual/en/dir.constants.php)
 *  Thread Starter [toojee](https://wordpress.org/support/users/toojee/)
 * (@toojee)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/thumbnails-not-deleted/#post-3276355)
 * 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
    thanks
 *  Plugin Contributor [Pedro Elsner](https://wordpress.org/support/users/pedro-elsner/)
 * (@pedro-elsner)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/thumbnails-not-deleted/#post-3276356)
 * Maybe, you can change the DIRECTORY_SEPARATOR on php.ini

Viewing 6 replies - 1 through 6 (of 6 total)

 The topic ‘Thumbnails not deleted’ is closed to new replies.

 * ![](https://ps.w.org/force-regenerate-thumbnails/assets/icon-256x256.jpg?rev=
   2816275)
 * [Force Regenerate Thumbnails](https://wordpress.org/plugins/force-regenerate-thumbnails/)
 * [Support Threads](https://wordpress.org/support/plugin/force-regenerate-thumbnails/)
 * [Active Topics](https://wordpress.org/support/plugin/force-regenerate-thumbnails/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/force-regenerate-thumbnails/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/force-regenerate-thumbnails/reviews/)

## Tags

 * [regenerate](https://wordpress.org/support/topic-tag/regenerate/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * 6 replies
 * 2 participants
 * Last reply from: [Pedro Elsner](https://wordpress.org/support/users/pedro-elsner/)
 * Last activity: [13 years, 9 months ago](https://wordpress.org/support/topic/thumbnails-not-deleted/#post-3276356)
 * Status: resolved