What do I need in wordpress import xml to import images?

Trying to generate my own wordpress import file. Everything has gone well except import images. What do I need?

Tested with the following code in my import.xml

Read More
<wp:attachment_url>
    http://www.fotoakuten.se/albums/userpics/Blomma-med-liten-spindel.jpg
</wp:attachment_url>

and the import worked without error but no image is displayed in the post or in the gallery.

I want the image to be a Featured Image: http://cdn3.wpbeginner.com/wp-content/uploads/2013/05/featured-image-wordpress.png

Related posts

Leave a Reply

1 comment

  1. In the item where you want to image to be features you should add something like:

    <wp:postmeta>
        <wp:meta_key>_thumbnail_id</wp:meta_key>
        <wp:meta_value><![CDATA[your image wp:post_id parameter]]></wp:meta_value>
    </wp:postmeta>
    

    Hope it helps.