Title: Failed with error code invalid file path?
Last modified: September 19, 2021

---

# Failed with error code invalid file path?

 *  Resolved [lkafrazier](https://wordpress.org/support/users/lkafrazier/)
 * (@lkafrazier)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/failed-with-error-code-invalid-file-path/)
 * Hello, I’ve been using this plugin for about 6 months and everything was working
   great, but all of a sudden anytime I load new images and try to compress them,
   I’m getting this error code:
 * Failed with error code invalid_file_path – The linked attachment ID does not 
   have a valid file path.
 * I’m completely confused on why this would be happening since it was working perfectly
   and then one day it wasn’t. My files are all done the exact same way that I’ve
   always created them for images.
 * Can anyone help me trouble shoot? My website is hosted by GoDaddy if that helps.
 * Kind regards!

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

 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/failed-with-error-code-invalid-file-path/#post-14887765)
 * [@lkafrazier](https://wordpress.org/support/users/lkafrazier/) Could you please
   try to refresh the image list and then try to compress the images from WP-Optimize
   > Images and check if the compression works?
 *  Thread Starter [lkafrazier](https://wordpress.org/support/users/lkafrazier/)
 * (@lkafrazier)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/failed-with-error-code-invalid-file-path/#post-14894743)
 * The images I loaded to the media library aren’t even showing up in the uncompressed
   images list in WP-Optimize.
 * When I click on the log….it’s just a very long list of all the images I loaded
   but with : could not find file for imgage ID and the ID number.
    -  This reply was modified 4 years, 11 months ago by [lkafrazier](https://wordpress.org/support/users/lkafrazier/).
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/failed-with-error-code-invalid-file-path/#post-14895967)
 * [@lkafrazier](https://wordpress.org/support/users/lkafrazier/) If you have the
   option enabled “Compress images when upload” then the images won’t show in the
   uncompressed list as its already compressed.
 *  Thread Starter [lkafrazier](https://wordpress.org/support/users/lkafrazier/)
 * (@lkafrazier)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/failed-with-error-code-invalid-file-path/#post-14896001)
 * But they aren’t compressed. When I go to the media library, once compressed it
   will show me there that they are compressed as well. If they are compressed, 
   then I have the option to restore the original. (All files prior to the past 
   few weeks are all like this…compressed and I can restore original). All the latest
   files I’ve uploaded….give me the option to compress them only….no restore option.
   None of the images I’ve loaded the last few weeks show compressed. And when I
   click on the compress button, I get the error message from the media library 
   as well. Both from the media library AND within the plugin itself….the images
   are not compressed. The file log from WP-Optimize even shows me a list of files….
   and every single image that I’ve loaded all reads with this error message. It’s
   literally just not working. As I mentioned, I’m not new to the plugin….I’m familiar
   with it….I just can’t explain why every file is now throwing this error message.
 *  [Harshad](https://wordpress.org/support/users/bornforphp/)
 * (@bornforphp)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/failed-with-error-code-invalid-file-path/#post-14902409)
 * [@lkafrazier](https://wordpress.org/support/users/lkafrazier/) Have you performed
   a conflict test yet?
 * Try deactivating all plugins except for WP-Optimize and see if it is resolved.
 * If so, reactivate each plugin one at a time until you find the culprit. You can
   check for the issue between activating each plugin, so you can see which one 
   is causing problems.
 * Please let us know your findings.
 *  Thread Starter [lkafrazier](https://wordpress.org/support/users/lkafrazier/)
 * (@lkafrazier)
 * [4 years, 10 months ago](https://wordpress.org/support/topic/failed-with-error-code-invalid-file-path/#post-14974678)
 * It appears it’s a conflict with Optimole Plugin….which used to never happen….
   apparently they give each image a new URL so they can be held on their server
   and that new image URL is making it to where WP Optimize isn’t recognizing them
   any longer.

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

The topic ‘Failed with error code invalid file path?’ is closed to new replies.

 * ![](https://ps.w.org/wp-optimize/assets/icon-256x256.png?rev=1552899)
 * [WP-Optimize – Cache, Compress images, Minify & Clean database to boost page speed & performance](https://wordpress.org/plugins/wp-optimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-optimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-optimize/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-optimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-optimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-optimize/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [lkafrazier](https://wordpress.org/support/users/lkafrazier/)
 * Last activity: [4 years, 10 months ago](https://wordpress.org/support/topic/failed-with-error-code-invalid-file-path/#post-14974678)
 * Status: resolved