I've been poking around the Codex in hopes of finding out how WP renames image files when you upload them... it's probably there but I can't seem to find it.

It seems that if I upload 1 file, like xue.jpg, that I get many files, like: xue-123x456.jpg xue-456x789.jpg

and so on. I take it that WP is making a series of different sizes for easy use in resizing or thumbnails or different displays or, haha, IDK really why WP does this, but I assume it's something like that.

So FIRST QUESTION - why is WP doing this and is there a predictable format to understand what the naming is?

SECOND QUESTION - I'm not certain this is the issue, but it seems that when I try to import a site using WP importer v0.6 that I get a lot of broken links which seem to be related to this naming issue. The post will call for, eg: xue-456x789.jpg

but the importer didn't get that file. It DID get xue.jpg

and if I manually go through the posts and delete the "-456x789" so it's calling for just "xue.jpg" then the image IS there and it does load. But this isn't practical for lots of posts.

I'd like to understand better how images are being renamed on upload, and how this does or doesn't get handled if the blog is later imported to another host.



Those numeric suffixes are image sizes corresponding to the width/height values in wp-admin->Settings->Media. It is part of the thumbnail system. If the right image manipulation libraries are installed on the server, Wordpress will create these different image sizes when you upload an image. The idea is that you can then load appropriately sized images for different locations and don't have to load full size images all the time and scale them in the browser, which is not efficient.

I've used that importer (assuming you mean this one) and it did pull in those multiple image sizes, so I don't know what the issue is with that.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.