1. You can use post_thumbnail to do that. The value is a uri or path of the post thumbnail (E.g. http://example.com/example.jpg or /path/to/example.jpg).
2. You are right, the value is a file name (E.g. page-wide.php).
Thread Starter
vamban
(@vamban)
Hi
I did tested used post_thumbnail to setup featured image. But it creates duplicate images. How can i overcome this issue?
I also got problem for featured image.
If I use uri(e.g. http://www.site.com/image.jpg), it shows:
Could not get remote file
If I use path, the media library just show a broken image.
Any possible reason to explain why the featured image import is not working? Thanks a lot.
> vamban
Duplicating images is by design, but I’ll fix this issue in next release.
https://github.com/hissy/rs-csv-importer/issues/41
> bearvv
Your problem is either 1 or 2 or both.
1. Your server could not get remote image.
2. Your server could not put images in wp-content directory.
Thanks Takuro Hishikawa.
Still can’t work for uri, need more time to check what’s wrong with my server.
If I use path, e.g. /path1/folder/image1.jpg
The script just put all the resize image at /path1/folder/ e.g. /path1/folder/image1-150×150.png ….
I also checked the link in the media library, it’s shows:
http://www.mysite.com/wp-content/uploads//path1/folder/image1.jpg
which is totally not correct. Since the script doesn’t move the images to the uploads folder.
I finally found a solution for path. Just leave my solution here, it might help other people.
I need to put all the images under the wordpress upload folder, e.g.
wp-content/uploads/2015/08
It works!