Title: [Plugin: Imsanity] &quot;File exists&quot; error when using plugin
Last modified: August 20, 2016

---

# [Plugin: Imsanity] "File exists" error when using plugin

 *  Resolved [eugleong](https://wordpress.org/support/users/eugleong/)
 * (@eugleong)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-imsanity-file-exists-error-when-using-plugin/)
 * I tried reinstalling but I keep getting this error:
 * > Warning: rename(example.com/ab1-1900×1900.jpg,example.com/ab1.jpg) [function.
   > rename]: File exists in example.com\wp-content\plugins\imsanity\imsanity.php
   > on line 67
   > Warning: Cannot modify header information – headers already sent by (output
   > started at example.com\wp-content\plugins\imsanity\imsanity.php:67) in example.
   > com\wp-includes\pluggable.php on line 897
 * [http://wordpress.org/extend/plugins/imsanity/](http://wordpress.org/extend/plugins/imsanity/)

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

 *  [Jason](https://wordpress.org/support/users/verysimple/)
 * (@verysimple)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-imsanity-file-exists-error-when-using-plugin/#post-2330096)
 * what version of php you are running?
 *  Thread Starter [eugleong](https://wordpress.org/support/users/eugleong/)
 * (@eugleong)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-imsanity-file-exists-error-when-using-plugin/#post-2330171)
 * I’m running 5.2.3.
 *  [Jason](https://wordpress.org/support/users/verysimple/)
 * (@verysimple)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-imsanity-file-exists-error-when-using-plugin/#post-2330183)
 * strange, your version of php is not behaving the same as I would expect. try 
   this if you feel comfortable. In the /wp-content/plugins/imsanity folder locate
   and edit the file ‘imsanity.php’
 * At line 67 it should look like this:
 * `rename($newPath, $oldPath);`
 * Add a new statement above that so it looks like this:
 *     ```
       unlink($oldPath);
       rename($newPath, $oldPath);
       ```
   
 * If this works then I’ll add it to the next update.
 *  Thread Starter [eugleong](https://wordpress.org/support/users/eugleong/)
 * (@eugleong)
 * [14 years, 7 months ago](https://wordpress.org/support/topic/plugin-imsanity-file-exists-error-when-using-plugin/#post-2330227)
 * It works perfect! Thanks so much Jason! Awesome plugin.
 *  [Jason](https://wordpress.org/support/users/verysimple/)
 * (@verysimple)
 * [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-imsanity-file-exists-error-when-using-plugin/#post-2330310)
 * this fix was added in version 2.0.0

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

The topic ‘[Plugin: Imsanity] "File exists" error when using plugin’ is closed to
new replies.

 * ![](https://ps.w.org/imsanity/assets/icon.svg?rev=2420360)
 * [Imsanity](https://wordpress.org/plugins/imsanity/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/imsanity/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/imsanity/)
 * [Active Topics](https://wordpress.org/support/plugin/imsanity/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/imsanity/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/imsanity/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Jason](https://wordpress.org/support/users/verysimple/)
 * Last activity: [14 years, 6 months ago](https://wordpress.org/support/topic/plugin-imsanity-file-exists-error-when-using-plugin/#post-2330310)
 * Status: resolved