Title: Optimizer removing attachments paths
Last modified: August 21, 2016

---

# Optimizer removing attachments paths

 *  Resolved [Keichide](https://wordpress.org/support/users/keichide/)
 * (@keichide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/)
 * Hello,
 * i have a serious Issue with the Cloud Version of you Plugin. It seems like it’s
   deleting the whole file Paths out of the Media Library!
 * That’s now the second time, that i see this Behaivor in combination with your
   Plugin. Yesterday i also had it, after i activated the Core Plugin (just to see
   if my Hosts has the Programs for it) which gave me a bunch of Permission Errors
   where he could not make that and that dir (which is’nt a Problem, because i normally
   fix them after a Plugin give me the error) but because i don’t had any of the
   Binarys, and also can’t use exec() on my Server, i deactivated the Core Plugin,
   deleted it and installed the Cloud version.
 * So i think, it started with the Core Version, that removed all of the Paths. 
   Anyway.. I restored the Database (which REALLY HURTS if you run a shop) with 
   a Backup which was 16 hours old.
 * Activated the Cloud Version again, checked the Library and anything was still
   there, so i started the Bulk Optimazion, it ran like a charm for a few Hours 
   without any Problems. So i said to myself “Let’s call it a day..” and goed to
   sleep.
 * Now i checked back and i’m really not quite sure when, but i think it started
   deleting stuff, when i hit “Scan and Optimize” that the Paths vanished.
 * Anyway.. I’m now sitting here.. And have to restore the Backup again.. Which 
   is another HUGE Data loose for me..
 * So.. Could you first tell me, in which Table WordPress saves the Attachment Paths
   for the Images and it’s full paths, so that i can just restore that single table?
 * Also just that you see it by your self: [](https://www.dropbox.com/s/z2r06vyzj2oisy1/empty.jpg)
 * All fields for the Image are empty.
 * And i did’nt activate another Plugin after the Backup nor did it happen anytime
   before.
 * Oh and… The Settings, i just turned the Optimization for jpg and png on, nothing
   more there.
 * [https://wordpress.org/plugins/ewww-image-optimizer/](https://wordpress.org/plugins/ewww-image-optimizer/)

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

 *  Thread Starter [Keichide](https://wordpress.org/support/users/keichide/)
 * (@keichide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031352)
 * I just remembered something.. When i woke up today, and checked the Status of
   the Bulk Process, my quota had run out. So i upgraded to Silver and resumed the
   process. Which could also be the reason. I did’nt check the Library there, because
   i was’nt expecting that again.
 *  Thread Starter [Keichide](https://wordpress.org/support/users/keichide/)
 * (@keichide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031356)
 * I found something, after digging further into it..
 * See: [](https://www.dropbox.com/s/t2ic54ahjwu7zph/list.jpg)
 * Here is what i found in the DB after i searched that first image name (which 
   is a Avatar saved from Facebook, that’s why it has such a strange file name)
 *     ```
       INSERT INTO<code>wp_ewwwio_images</code>(<code>id</code>,<code>path</code>,<code>image_md5</code>,<code>results</code>,<code>gallery</code>,<code>image_size</code>,<code>orig_size</code>) VALUES
       (4993, '/www/htdocs/w0114e4a/wp-content/uploads/2014/06/1536618_417349305034438_1027195089_n.jpg', NULL, 'Reduced by 0.2% (28,0 B )', NULL, 16178, 16206); (sorry, had to export the value to get the PATH.)
       ```
   
 *     ```
       SELECT *
       FROM <code>d018c312</code>.<code>wp_ewwwio_images</code>
       WHERE (
       CONVERT( <code>id</code>
       USING utf8 ) LIKE '%1536618_417349305034438_1027195089_n%'
       OR CONVERT( <code>path</code>
       USING utf8 ) LIKE '%1536618_417349305034438_1027195089_n%'
       OR CONVERT( <code>image_md5</code>
       USING utf8 ) LIKE '%1536618_417349305034438_1027195089_n%'
       OR CONVERT( <code>results</code>
       USING utf8 ) LIKE '%1536618_417349305034438_1027195089_n%'
       OR CONVERT( <code>gallery</code>
       USING utf8 ) LIKE '%1536618_417349305034438_1027195089_n%'
       OR CONVERT( <code>image_size</code>
       USING utf8 ) LIKE '%1536618_417349305034438_1027195089_n%'
       OR CONVERT( <code>orig_size</code>
       USING utf8 ) LIKE '%1536618_417349305034438_1027195089_n%'
       )
       LIMIT 0 , 30
       ```
   
 * Also… 1536618_417349305034438_1027195089_n got me 690 Hits in wp_posts
 * **EDIT:**
 * uhm.. I seems like all the orginal Images are still linked in the DB.. I just
   checked a few Pages and looked what still was in the Media Library.. And everything
   was still there.. It’s just that there is a HUGE bunch of death Entrys which 
   got pulled into the Media Library from the Database. And also the Thumbnail in
   the Library is missing somehow.. [](https://www.dropbox.com/s/lq9nso4rgguum5k/avatar.jpg)
   That user now has 48 Pages of Images but should only have 1 (and i already are
   at 100 shown images)
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031378)
 * Ok, so you had me freaked out for a minute there, but I’m still not 100% clear
   on what is going on with your site. So let me explain what the plugin does, and
   what it is capable of, and see if that sheds some light on it.
 * First, the only thing that COULD happen if the plugin has a bug, is that it would
   delete the actual images, or replace them with empty files. I’ve built pretty
   extensive protections in to avoid this, so it is highly unlikely (hasn’t happened
   since the 1.0.x days of the plugin almost 2 years ago), but I never rule anything
   out in that area.
 * The attachment paths are either in the wp_posts table or the wp_postmeta table,
   and this plugin doesn’t ever modify those directly unless you have image conversion
   turned on, so let me know if you are using any of the conversion options (like
   png2gif).
 * Additionally, if you run out of quota, any bulk optimize should stop almost immediately,
   so please let me know if that did not appear to be the case. When the license
   is exceeded, it sets a global variable, so that the bulk optimizer knows about
   it, and shuts down, instead of running all night and doing nothing useful.
 * Also, you seem to be having some confusion about the wp_ewwwio_images table. 
   This is a custom table managed by, and use by only my plugin. It is a simple 
   record of images that have been processed by the plugin, what size they were 
   originally, what size they are now, and a message with the savings achieved.
 * For images in the Media Library, the ‘savings’ message is also stored as a custom
   value in the attachment metadata which is stored in the wp_postmeta table, but
   we use the WP functions for working with it to avoid messing anything up. The
   paths are not modified unless the plugin has been told to convert an image and
   is actually successful.
 * Lastly, I just want to confirm that you are NOT using the Scan & Optimize for
   the images in your Media Library, correct? It is for images OUTSIDE of the Media
   Library, as clearly specified on the Bulk Optimize page. The top Start Optimizing
   button is for the Media Library, not that it should make much difference in what
   you’re talking about.
 *  Thread Starter [Keichide](https://wordpress.org/support/users/keichide/)
 * (@keichide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031379)
 * So.. First sorry this damn forum does’nt let me Edit my posts after a certain
   time.. So i had to write 3 posts instead of editing one.. And things got a bit
   confusing..
 * Anyway, you are right, the Plugin did’nt delete anything as i stated in post 
   3 here, so i’m sorry about saying this.
 * The Thing is now, that (somehow) all the stuff from the wp_ewwwio_images table
   got mixed into the Media Library of WordPress and he even multiplied the entrys
   of a single image by 20 or 30, which is why i now have a few hundread pages in
   the Library and at first did’nt saw that the orginal Images are still there and
   did’nt saw that nothing happend with them.
 * Also about the “Scan & Optimize” Feature.. I just let him scan the directories
   of WordPress, i did’nt set anything in the Options which tells them, where he
   should look for images. So i think i’m was using it like intended.
 * And Like i also said somewhere.. The only settings which are Active are they 
   for the JPG and PNG Optimizing everything else is unchecked and untouched.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031381)
 * Ok, that helps clarify. Just wanted to get us on the same page here.
    The wp_ewwwio_images
   table doesn’t really ‘mix’ anywhere. It’s not technically possible to mix the
   entries. What you MAY be seeing is the result of your theme asking wordpress 
   to generate multiple resizes for each image in the Media Library. I’ve seen some
   sites have up to 16 resizes per image, but never 20-30, but anything is possible.
 * So the question is, where are you seeing this ‘multiplication’? Are you looking
   at the Media Library page in the WordPress dashboard, or looking at the actual
   files on the server in the /uploads/ folder?
 *  Thread Starter [Keichide](https://wordpress.org/support/users/keichide/)
 * (@keichide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031382)
 * That makes sense.. I’m currently using WP Post Thumbnail to make 4 Sizes out 
   of a single image… And i also see now, that every link to my Screenshots here
   got deleted o__O
 * Anyway.. I’m seeing them in the Media Library that there a 10 or more Pages (
   with a view setting of 100) for a single Image.
 * I’m just not really sure about the /uploads/ folder on the Server.. The current
   month somehow has 3436 Files, i need some time to look deeper into that.
 * **Edit:** Nope, everything in the /uploads/ folder is correct no duplicates or
   anything there.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031384)
 * hmm, sounds like maybe one of your other plugins is interacting strangely with
   EWWW IO (or all by itself, hard to say at this point), and creating duplicates
   in the media library. EWWW IO doesn’t have any code capable of such a thing, 
   but sometimes plugins can interact with each other in unexpected ways. So, 2 
   things:
    1. Can you post a screenshot from your media library where you’re seeing
   the problem? 2. Would you mind sending me a logon for your site so I can take
   a closer look into the issue? You can send it via the contact form at [http://www.exactlywww.com](http://www.exactlywww.com)
 *  Thread Starter [Keichide](https://wordpress.org/support/users/keichide/)
 * (@keichide)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031386)
 * I just send you a Mail over the Contact form so you can take a look by yourself.
 *  Plugin Author [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031476)
 * After extensive troubleshooting with Keichide, it was determined to actually 
   be a conflict between WP User Avatar and Relevanssi causing the issue.

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

The topic ‘Optimizer removing attachments paths’ is closed to new replies.

 * ![](https://ps.w.org/ewww-image-optimizer/assets/icon-256x256.png?rev=1582276)
 * [EWWW Image Optimizer](https://wordpress.org/plugins/ewww-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ewww-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ewww-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ewww-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ewww-image-optimizer/reviews/)

 * 9 replies
 * 2 participants
 * Last reply from: [Shane Bishop](https://wordpress.org/support/users/nosilver4u/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/optimizer-removing-attachments-paths/#post-5031476)
 * Status: resolved