Title: Conversion failed / Database not in sync
Last modified: August 22, 2016

---

# Conversion failed / Database not in sync

 *  Resolved [wrybit](https://wordpress.org/support/users/wrybit/)
 * (@wrybit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/)
 * Hi,
 * I converted many Images from PNG to JPG. Most of them went well, but some are
   only as File converted, but the database references still the old PNG file. There
   was no visual indication that something went wrong. So I didn’t recognised it
   in the first moment. Now I have a lot of errors in the Fontend and in the Backend.
   What can I do now? As there are about 50 wrong pic, I seek for a “non” manual
   solution 🙂
 * Greez WrYBiT
 * [https://wordpress.org/plugins/ewww-image-optimizer/](https://wordpress.org/plugins/ewww-image-optimizer/)

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

 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526664)
 * Errors in the backend where? Anything on the front-end will have to be fixed 
   manually. The plugin searches only through the posts table, and updates any place
   where it finds the full guid (the url generated by WP for the image).
 * The Media Library should be fully updated, but if you can provide screenshots
   of areas in the backend where it does not seem to be updated, that would be good.
 *  Thread Starter [wrybit](https://wordpress.org/support/users/wrybit/)
 * (@wrybit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526670)
 * Wow. Quick response!
 * Error means, Image is missing 🙂 My fault.
 * File:
    – old – filenameXYZ.png – new – filenameXYZ-1.jpg … and all the pre-rendered
   rubbish from wordpress
 * Database:
    – wp_ewwwio_images .. all ok = new filenames – wp_postmeta .. fail
   = still old path and image types – wp_posts .. fail = still old guid
 * Backend:
    – Media Lib – (Img missing as Icon) and Text: Could not retrieve file
   path.
 * Frontend:
    – Images is missing .. ok 🙂
 * What to do now?
    Why did this happen? How to avoid in the future?
 * Greez WrYBiT
 *  Thread Starter [wrybit](https://wordpress.org/support/users/wrybit/)
 * (@wrybit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526702)
 * Hi,
 * I’ve just found out, when I use “Media > Add new” and Upload a PNG, it directly
   creates the issue. As “Convert PNG to JPG” is on, it seems like it douse this
   directly after upload and directly fails to write the new GUID (and rest) to 
   the Database. To me, easy to reproduce and at least at my environment, an unavoidable
   bug. ;( I have to turn of PNG to JPG, to get it work just right.
 * Could you reproduce this issue, too?
 * Greez WrYBiT
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526707)
 * Did any of the converted images work properly?
 *  Thread Starter [wrybit](https://wordpress.org/support/users/wrybit/)
 * (@wrybit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526715)
 * Way 1:
    – Upload via “Media > Add new” = All PNGs fail
 * Way 2:
    – Upload inside a eg. Portfolio = All PNGs fail
 * Way 3:
    – Upload as PNG (with “PNG to JPG” turned of) and than via Media Lib “
   PNG to JPG” = works and works not .. just testet 10 equal (copyed 10 times same
   file) files. 4 Failed, 6 are just fine.
 * I don’t know why .. :/
 * My Setup:
    – WordPress 4.0.1 – EWWW 2.1 – Plugin Status: All Clear – WPML Media
   2.1.7
 * Greez WrYBiT
 *  Thread Starter [wrybit](https://wordpress.org/support/users/wrybit/)
 * (@wrybit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526719)
 * _(forgot one way ..)_
 * Way 4:
    – Via “Bulk Optimize” .. this is where my pain came from
 * – This baby failed at about 50 files .. and WordPress can’t renew Images ..
    –
   Now I need to deleted the “JPG Version” from Media Lib, in 3 Langs. – Than delete
   the WordPress “pre-rendered” Temp File mess via SFTP – Than re-upload the Original
   file .. now without conversion 🙂 – And than add it manually 3 time to the old
   entries …
 * So .. 5 min per Action .. *50 .. 250 .. ~6h :/
    And still not knowing why it 
   happens. May I ask, do you have this issue, too?
 * Greez WrYBiT
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526723)
 * What levels do you have optipng/pngout set to? And are you using both, or just
   optipng?
 * I ask because PNG optimization can be really slow, especially on larger images
   that should have been JPGs in the first place. What you can try is first run 
   them through PNG optimization, then disable optipng & pngout, and run the conversion.
   That will allow the conversion to run much quicker and avoid the timeouts. If
   that still isn’t working, just disable optipng and pngout on those image entirely
   and only run the conversion.
 * FYI: a “large” PNG is generally anything over 400kb
 *  Thread Starter [wrybit](https://wordpress.org/support/users/wrybit/)
 * (@wrybit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526737)
 * optipng optimization level @ 2 (default)
    pngout optimization level @ 2 (default)
 * Some PNG are “large” ~800kb (and you are right, should had been JPGs, but ..)
   
   But some are small ~5kb big Logos with opacity, and they fail, too.
 * But not the Picture fails, but the Database!?!
    The file(s) where well converted
   and are laying around fine on the server. But the correct Info about the new 
   Filename was not stored to the DB. So there must be a “check” function failing
   or such. And I would be helpful, if another check run thought, before the org.
   gets killed. Checking if all Data is fine .. Files .. WordPress Resize files 
   AND the DB. 🙂
 * BTW: The PNG to JPG sets also the wrong BG, not the set #ffffff but #000000.
   (
   Don’t know if this helps ..)
 * So I convert the PNGs local now and re-upload them, if I have to do it anyway.
   
   Or is there a way to fix the database .. somehow.
 *  Thread Starter [wrybit](https://wordpress.org/support/users/wrybit/)
 * (@wrybit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526745)
 * eg. a DB entry of a file which failed.
    All mixed up .. somehow.
 * On the Server all files are already JPGs with a “-1” in the middle.
    eg. “typo3_new_login_screen_v5_accepted-
   1-515×1030.jpg”
 *     ```
       array (
         'width' => 1398,
         'height' => 891,
         'file' => '2014/09/typo3_new_login_screen_v5_accepted-1-1.jpg',
         'sizes' =>
         array (
           'thumbnail' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-80x80.png',
             'width' => 80,
             'height' => 80,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-80x80.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-80x80.png</span>',
           ),
           'medium' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-500x318.png',
             'width' => 500,
             'height' => 318,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-500x318.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-500x318.png</span>',
           ),
           'large' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-1-1030x656.jpg',
             'width' => 1030,
             'height' => 656,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-1-1030x656.png',
             'ewww_image_optimizer' => 'Reduced by 95.0% (302.4&nbsp;kB)',
           ),
           'widget' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-36x36.png',
             'width' => 36,
             'height' => 36,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-36x36.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-36x36.png</span>',
           ),
           'square' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-180x180.png',
             'width' => 180,
             'height' => 180,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-180x180.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-180x180.png</span>',
           ),
           'featured' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-1-1398x430.jpg',
             'width' => 1398,
             'height' => 430,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-1-1398x430.png',
             'ewww_image_optimizer' => 'Reduced by 94.0% (351.5&nbsp;kB)',
           ),
           'featured_large' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-1-1398x630.jpg',
             'width' => 1398,
             'height' => 630,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-1-1398x630.png',
             'ewww_image_optimizer' => 'Reduced by 95.5% (530.5&nbsp;kB)',
           ),
           'portfolio' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-495x400.png',
             'width' => 495,
             'height' => 400,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-495x400.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-495x400.png</span>',
           ),
           'portfolio_small' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-260x185.png',
             'width' => 260,
             'height' => 185,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-260x185.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-260x185.png</span>',
           ),
           'gallery' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-845x684.png',
             'width' => 845,
             'height' => 684,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-845x684.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-845x684.png</span>',
           ),
           'magazine' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-710x375.png',
             'width' => 710,
             'height' => 375,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-710x375.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-710x375.png</span>',
           ),
           'masonry' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-705x449.png',
             'width' => 705,
             'height' => 449,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-705x449.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-705x449.png</span>',
           ),
           'entry_with_sidebar' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-1-845x321.jpg',
             'width' => 845,
             'height' => 321,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-1-845x321.png',
             'ewww_image_optimizer' => 'Reduced by 92.0% (119.5&nbsp;kB)',
           ),
           'entry_without_sidebar' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-1-1210x423.jpg',
             'width' => 1210,
             'height' => 423,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-1-1210x423.png',
             'ewww_image_optimizer' => 'Reduced by 93.4% (251.9&nbsp;kB)',
           ),
           'shop_thumbnail' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-120x120.png',
             'width' => 120,
             'height' => 120,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-120x120.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-120x120.png</span>',
           ),
           'shop_catalog' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-450x450.png',
             'width' => 450,
             'height' => 450,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-450x450.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-450x450.png</span>',
           ),
           'shop_single' =>
           array (
             'file' => 'typo3_new_login_screen_v5_accepted-1-450x286.png',
             'width' => 450,
             'height' => 286,
             'mime-type' => 'image/png',
             'converted' => 1,
             'orig_file' => 'typo3_new_login_screen_v5_accepted-1-450x286.png',
             'ewww_image_optimizer' => 'Could not find <span class=\'code\'>/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted-1-450x286.png</span>',
           ),
         ),
         'image_meta' =>
         array (
           'aperture' => 0,
           'credit' => '',
           'camera' => '',
           'caption' => '',
           'created_timestamp' => 0,
           'copyright' => '',
           'focal_length' => 0,
           'iso' => 0,
           'shutter_speed' => 0,
           'title' => '',
           'orientation' => 0,
         ),
         'ewww_image_optimizer' => 'Reduced by 95.7% (594.0&nbsp;kB)',
         'converted' => 1,
         'orig_file' => '/usr/www/users/domain/wp/wp-content/uploads/2014/09/typo3_new_login_screen_v5_accepted.png',
       )
       ```
   
 *  Thread Starter [wrybit](https://wordpress.org/support/users/wrybit/)
 * (@wrybit)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526746)
 * see the variations 🙂
 * file = jpg, mime-type = png, org = png
    file = png, mime-type = png, org = png
   file = jpg, mime-type = jpg, org = png
 * Why? 🙂
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526810)
 * Maybe there is a pattern here, trying to find it…
    I hadn’t noticed the mime-
   type of the resizes before, not sure why the plugin doesn’t update those, but
   I see it on my server too (but not any of the other weirdness with the db).
 *  Plugin Author [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * (@nosilver4u)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526813)
 * Not sure where you got #3 from (file = jpg, mime-type = jpg, org = png), as I
   don’t see that in the metadata you posted.
 * Here’s the patterns I’m seeing:
 * file = jpg, mime-type = png, org = png
    Upload was successful, conversion was
   successful, everything peachy (except that pesky mime-type, but I’m not sure 
   WP uses that at all)
 * file = png, mime-type = png, org = png
    Every one of these resizes has the ‘could
   not find …’ error message stored in the ewwwio metadata field, which can only
   happen if the file is not found when the plugin attempts to optimize/convert 
   it. It literally runs the php file_exists() function and goes with whatever the
   results of that say.
 * I’m guessing that the image you posted metadata for was a newly uploaded one,
   because there is a definite cutoff in the image dimensions. This is backwards
   from what I see on my local install, but it appears your site generates the largest
   images first, and then once it hit a width of 845, one of the images succeeded,
   and one failed, and everything smaller than that failed. That didn’t appear to
   kill the process, because this is just the wp_image_editor phase and no conversion
   happens here, just optimization.
 * The second phase is after the metadata is generated for the image. At this point,
   it can actually attempt conversion, and it seems to go just fine until it bumps
   into those missing resizes. The quandry is why they are missing in the first 
   place. EWWW doesn’t ever delete anything UNLESS you have the ‘Delete Originals’
   option turned on, but then it should be happening to every image, not sporadically.
 * At any rate, it might be useful to actually be able to login to your site and
   see what is going on for myself. You can send me a temp login if you like via
   [http://www.shanebishop.net](http://www.shanebishop.net)

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

The topic ‘Conversion failed / Database not in sync’ 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/)

## Tags

 * [conversion](https://wordpress.org/support/topic-tag/conversion/)
 * [database](https://wordpress.org/support/topic-tag/database/)
 * [Failed](https://wordpress.org/support/topic-tag/failed/)

 * 12 replies
 * 2 participants
 * Last reply from: [nosilver4u](https://wordpress.org/support/users/nosilver4u/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/conversion-failed-database-not-in-sync/#post-5526813)
 * Status: resolved