2

My theme uses 8 different thumbnail sizes. I imported my local installation to the final server using phpmyadmin to export the wordpress database. Everything is smooth except for the attachments: many post thumbnails are broken. The file is there and displayed, but at the wrong size. When i open the file in the media library or in a post 's "Add image" interface, it displays that the image size is (0x0).

Only solution i find was to delete each post image and reupload it. Then it works, so it's the database import that's provoking the error.

I don't get how this error happens. Any idea? And how to fix it? The "Rebuild Thumbnails" plugin doesn't solve it unfortunately.

  • Are you doing anything with database other than straight 1:1 copying? – Rarst Oct 13 '11 at 17:10
  • no, i'm not. just plain sql export > sql import. – pixeline Oct 14 '11 at 16:27
  • 1
    But haven't you done a serialized search/replace for the URLs? Don't you get any 404 (Chrome Inspector or Safari Activity Monitor) errors on media files? ::: Oh, just saw this is an old question... Found the cause? – brasofilo Jul 2 '12 at 19:12
  • Are you using Auto Post Thumbnail plugin? I wrote a simple script to fix the missed attachments (it doesn't hurt your site), just try it. – Anh Tran Sep 2 '12 at 15:50