After importing, no images appear in posts
-
Summary:
the image links in the posts are “myblog.com/wp-content/uploads/2016/12/image.jpg”.
Shouldn’t they be “myblog.files.wordpress.com/wp-content/uploads/2016/12/image.jpg”?History:
I had an old account with a few posts in wordpress.com.
For the last year I used a WordPress site on another host creating a lot of posts (~300).
I wanted to move back to wordpress.com.Actions:
1. With the wordpress export tool I created the XML file (10Mb) on the other host.
2. I created a test account in wordpress.com, imported the XML, everything worked fine. Links in posts had been transformed correctly. This test blog will be deleted as soon as the original one works fine.
3. I imported the XML in the old wordpress.com account. The imported posts do not have the appropriate image source (they contain “wp-content/uploads” instead of “files.wordpress.com”).Any ideas how to correct that without editing every post?
-
edit:
the correct link in the second line should read “myblog.files.wordpress.com/2016/12/image.jpg”. -
When we need Staff help with issues Volunteers cannot resolve like this one we type modlook into the sidebar tags on our forum threads. I did that for you. How do I get a Moderator/Staff reply for my question? https://en.support.wordpress.com/getting-help-in-the-forums/#how-do-i-get-a-moderatorstaff-reply-for-my-question Then we subscribe to this thread so we are notified when they respond. To subscribe look in the sidebar of this thread, find the subscribe to topics link and click it.
-
P.S. Also note that Staff will ask for the URL of the relevant site that you are exporting from. Is it still online?
-
timethief, thank you very much.
I had already subscribed, but I had no knowledge of the “modlook” tag.I understand that it’s a difficult issue, but hoped that another user would have resolved it in the past.
Both the test and the original site are online, yes.
-
Note: I can also edit the XML and replace
“myblog.com/wp-content/uploads/2016/12/image.jpg”
with
“myblog.files.wordpress.com/2016/12/image.jpg”.However, If I import again, I’m afraid I would end up with duplicate posts (600 instead of 300).
-
-
-
I see a single URL and it is https://ablaoublaweb.wordpress.com/
If there are others and if you do not post them before Staff work their way to this thread then it will take longer to resolve your issue.
-
-
-
Hi there,
Just to confirm, on your test site all the images imported correctly and are in the media library now?
If that’s the case, the easiest solution is to create a new export file on the test site and import that to your main site instead. Re-importing the same content shouldn’t cause duplicate posts, but it might be best to empty the main site first before you re-import the content.
If you want to try this, please confirm and provide the URL of your main site to which you’re trying to import. Also note that emptying the site will remove ALL content, so if there was any content before you imported the file that will be removed as well.
The other option is that we can try and manually pull in the images from your self-hosted site. To do this the self-hosted site needs to still be online, publicly viewable, and at the same domain as it was when you created the export file. I will also need to know the URL of both the self-hosted site, and of the site to which you’re importing.
In this case I’ll need a developer to run a script on our system to fetch the images from your self-hosted site and rewrite the links on your WordPress.com site. It’s not guaranteed to work, and it will also be a few days, given the time of year.
Please let me know which option you want to try, and provide the links and confirmation I requested for the respective option.
-
Hi kokkieh,
right now, I’m directed to try this:
1. don’t bother with old-external-hosting site nor with the test site.
2. Backup only the posts from main wordpress site in an XML file.
3. Edit the XML and replace
“myblog.com/wp-content/uploads/2016/12/image.jpg”
with
“myblog.files.wordpress.com/2016/12/image.jpg”.
4. Delete the main wordpress site posts.
5. Import the edited XML file.Do you think it will work?
-
Editing the links in the XML file won’t work, as it will then effectively tell the importer to look for the images in the site’s own media library instead of in the self-hosted site’s.
The links in the XML file tells the importer where to go look for the images so it can import them. When the images are imported, the links are then automatically rewritten. But this doesn’t always work correctly, in which case we need a developer to fetch the images manually, as I explained above.
If the images are in the media library of your test site and the posts on that site are showing the correct links, the easiest will really be to just make a new export on the test site and import that. With a wpcom to wpcom migration the chance is much smaller of images not being imported than with self-hosted to wpcom. Smaller as in I’ve never seen this happen yet with a wpcom to wpcom migration.
-
Hi again,
I have changed the links in the XML and most of the pictures show up, now.
Some of the pictures, however (~500 images of the total 2500) have the following problem:
The import script has not saved the image with the original name, e.g. “Mystery-of-Art-199×300.jpg”, but as “Mystery-of-Art.jpg”.The post contains a link to the “Mystery-of-Art-199×300.jpg” filename.
The old external-hosting site is still up,
the DNS servers however have been transferred to wordpress.com.
So we cannot access the old web site (we can by FTP, however)I cannot understand what the import script has done:
It has downloaded the pictures in the library,
it has renamed them,
but it has not changed the link in the post.
Why? -
The import script has not saved the image with the original name, e.g. “Mystery-of-Art-199×300.jpg”, but as “Mystery-of-Art.jpg”.
The post contains a link to the “Mystery-of-Art-199×300.jpg” filename.
Can you please give me a link to the specific post so I can check this?
I cannot understand what the import script has done:
It has downloaded the pictures in the library,
it has renamed them,
but it has not changed the link in the post.I asked you above NOT to change the links in the import file. The importer automatically rewrites the links when it imports the images, and by changing the file manually you prevented the importer from doing this correctly.
If you are certain the images are in your site’s media library and it’s only the links in the posts that are wrong we might be able to fix it on our end, but I’ll need to see an actual example of an image that is not linked correctly.
-
Can you please give me a link to the specific post so I can check this?
Yes, just have a look at
https://orthodoxcityhermit.com/2016/11/10/holy-monastery-lady-kipina-epirus/The filename on the post is “convent1-1024×576.jpg” and the filename in media library is “convent1”.
I asked you above NOT to change the links in the import file. The importer automatically rewrites the links when it imports the images, and by changing the file manually you prevented the importer from doing this correctly.
On the contrary, the importer changed the links so that the site could not work at all (every image was missing). So I changed the XML and most pictures work now.
Moreover, I did not change the XML file of the External Server. That had been imported and all the images were not displayed.
Instead, I made a new export from the wordpress.com, site, changed the src in the respective img (where appropriate) and uploaded the XML again.
-
Okay, here is the problem. The image links in that post all point to your WordPress.com media library, e.g. https://orthodoxcityhermit.files.wordpress.com/2016/11/convent1-1024×576.jpg
Except, that file does not exist in your media library, it is still in your self-hosted site’s media library.
We need the link to the image in your self-hosted site’s media library in order to fetch the image from there, but because you edited the XML file yourself, there is no record any more of the image’s original location, so we don’t know where to go fetch it. That is why I asked you not to edit the XML file.
So we’re back where we started. You will need to completely empty this site and then either import the content from the test site where it imported correctly, or you need to re-import it from the self-hosted site using the original, unedited export file.
If, on the new import, all images aren’t imported correctly, let us know so we can fix it. Failed image import isn’t something you can fix by editing the import file. Instead, editing the file just makes it completely impossible for the images to be imported at all.
- The topic ‘After importing, no images appear in posts’ is closed to new replies.