WordPress.org

Ready to get started?Download WordPress

Forums

Import post images via URL in CSV files (23 posts)

  1. activestatedesigns
    Member
    Posted 3 years ago #

    Hello there,

    I am having issues bringing in images when I have a mass import via CSV Importer plugin. I am trying to bring in all my products and I can successfully get all post content including custom taxonomies and custom fields imported. However I cannot get it to pull up the images.

    I have uploaded my post image here: http://activestatedesigns.com/wp-content/uploads/TEE-I-CO-Ski02_Design.jpg and it's uploaded in media library just fine. But then I try the heading of this: csv_post_content in my .csv file with this <img src="http://activestatedesigns.com/wp-content/uploads/TEE-I-CO-Ski02_Design.jpg" /> to call in that image. But it doesn't work?

    Does anyone have any ideas how to do this? I really need to get these images for my product loads... I have two images per product.

    Thanks,
    Lorne

  2. Which plugin are you using? Link please?

  3. activestatedesigns
    Member
    Posted 3 years ago #

    Well I have tried two.

    The most luck i've had is "CSV Importer". I have successfully imported the custom taxonomies and all custom fields except for the image. I've tried image url with several heading title variations but nothing works.

    The other one I've tried is "WP Export" It has both import and export functions. However I cannot for the life of me bring in my custom taxonomies with that one. I have gotten real close with a successful image upload by using the heading: IMAGE. However, I have this error on my post page where the image should be:

    Warning: fopen(http://activestatedesigns.com/?attachment_id=1467) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/bourdod1/public_html/activestatedesigns.com/wp-content/themes/TheJewelryShop/lib/engine/cat_navi.php on line 1810
    . When I check my media uploader, the correct image is shown as part of the gallery. So maybe I need to import it as the featured image too? I'm curious what heading in the csv file that needs to be.

    So basically depending on which plugin I use, I run into different issues. If I can get the image and custom taxonomies figured out for either plugin, then I will roll with either one.

    Thanks in advance,
    Lorne

  4. activestatedesigns
    Member
    Posted 3 years ago #

    Any ideas?

    Thanks,
    Lorne

  5. bazonline
    Member
    Posted 3 years ago #

    Hi is there any progress on this? I am busy with CSV Importer with some success but am also not able to link the images with the posts being imported.

    The plugin works perfectly but I am not sure what to call the image link headers in the csv or even if it is possible this way. Any advice?

  6. activestatedesigns
    Member
    Posted 3 years ago #

    Hey Bazonline,

    I have made progress on this. I got the pictures working now! Basically I have gotten the pictures attached and one picture as a featured image.

    Basically name header for your featured image: image_thumb and name any other image header as: post_img. You can have multiple post_img columns depending on however many images you need to be attached. Obviously you need to upload the images first, I upload them to wordpress and then just put the URL in.

    Let me know if that helps!

    Lorne

  7. bazonline
    Member
    Posted 3 years ago #

    Thanks Lorne, will play with those options. So I do have to upload the images first and not merely place them in the correct directory? - what is the string to use, I see you posted the following example is this correct?

    <img src="http://activestatedesigns.com/wp-content/uploads/TEE-I-CO-Ski02_Design.jpg" />

    Thanks for your help, I have been battling with this for a while now

  8. activestatedesigns
    Member
    Posted 3 years ago #

    Hey bazonline,

    Yea basically I upload my images through the media library, then if you go view your image it will show you the image URL and you just copy that and paste it. No special directory or anything needed.

    Hope that helps,
    Lorne

  9. activestatedesigns
    Member
    Posted 3 years ago #

    Oh, and you don't need the <img src=" tag. Just put the URL in there.

    HTH,
    Lorne

  10. bazonline
    Member
    Posted 3 years ago #

    Thanks Lorne, you are a star

  11. activestatedesigns
    Member
    Posted 3 years ago #

    Hello again,

    So I am trying to mass import my post via csv again. Turns out I was wrong, the header post_img, does not work :( image_thumb is the only one I got working properly for the main image.

    Does anyone have any idea what slug or tag I should use for the header to attache images to my post?

    Thanks,
    Lorne

  12. activestatedesigns
    Member
    Posted 3 years ago #

    Does anyone know how to import another image that is attached to the post? The only image URL that I can get to work is the image_thumb. However I want 2 images in my posts.

    Thoughts?

  13. bazonline
    Member
    Posted 3 years ago #

    Hi Lorne,

    I see we are both still battling with this. I had no luck at all but found a plugin called Add From Server that pulls in photos that have already been FTP to the server, the only limitation I had was I needed to do it in batches of about 250 at a time or it bombed out.

    Then came the tedious task under WP Media Library of attaching manually each one to a post.

  14. activestatedesigns
    Member
    Posted 3 years ago #

    Hey Bazonline,

    Well I have uploaded my images via the media library tool and uploaded them all at the same time. Now it's a matter of attaching the second image to my posts. So it sounds like with your method you still need to manually add each image to the posts. Unless I'm misunderstanding you?

  15. bazonline
    Member
    Posted 3 years ago #

    Yes it is a manual link to each post once you have imported all the images. I cannot find any reference to an easier method; at least this way is slightly faster than doing it the ordinary way through Upload New Media in back-office. Good luck! Let me know what your site looks like once you done,
    Barry.

  16. activestatedesigns
    Member
    Posted 3 years ago #

    Hey Barry,

    I appreciate the quick response. Ya, I have uploaded all my images for one of my product lines already. I had no issues using the Media Uploader.

    I guess I'll have to manually attach the second image.

    If you want my site is already up and running, however I have quite a bit to do still: http://www.activestatedesigns.com

    Basically if you search Denver in the top bar, you'll get 6 products but all the same design. I am trying to figure out a way to make that one product and have a dropdown on the product page to select if it's mens, womens, american apparel, etc. Then the buy now link jumps to the correct page since I don't host my own shopping cart. I also am planning on adding the rest of my products and t-shirt designs for more than just Colorado.

    Look through the site and feel free to give me any feedback! I'd greatly appreciate it. I too would be interested to see your site and what you do.

    Thanks,
    Lorne
    ActiveState Designs | State Inspired Designs

  17. iantresman
    Member
    Posted 2 years ago #

    I've found the Add From Server plug-in, so can get my images into Media Library.

    But is it possible to add image data (caption, description, Alt text, date, etc) using the CSV Importer plug-in?

  18. dompl
    Member
    Posted 2 years ago #

    Did you guys had any luck on this. I'm trying to add image thumbnail with image_thumb but with no effect.

  19. activestatedesigns
    Member
    Posted 2 years ago #

    Sorry guys,

    I haven't worked on this for months, nor have I found a solution. At the time I spoke on the phone with someone VERY familiar with the plugin and he couldn't figure out how to get it troubleshot. So I only have the solution for the featured image. But when I have multiple images (which I do for every product), I don't know how to add a URL as an attached image.

  20. dompl
    Member
    Posted 2 years ago #

    Thanks activestatedesigns! What you are saying is that you have managed to import featured image. I'm trying the image_thumb in 3.2.1 and it is just not doing anything.
    Any suggestions please?

  21. activestatedesigns
    Member
    Posted 2 years ago #

    Hey Dompl,

    Well as I mentioned I haven't worked on this for months so I can't really remember exactly what I did.

    But have you uploaded your featured image to your media library? I remember I uploaded my image there first, then I added the URL to the image_thumb in my csv.

    See if that works,
    Lorne

  22. spyboy70
    Member
    Posted 2 years ago #

    I found where the featured image is referenced, it's a different table in the database.

    CSV Importer plugin is only working with the wp_posts table.

    It needs to also work with the wp_postmeta table.

    there's a thumbnail_id in there an the value is the ID # of the image that's uploaded into the media section of WordPress.

    That's about as much as I can figure out by editing the SQL database manually. I was able to change the ID# to a different one and my post now has a different featured image.

    But, I don't know how to automated this, the CSV Importer plugin would have to be rewritter to allow for featured image support.

  23. nuevomediagroup
    Member
    Posted 2 years ago #

    @spyboy70
    thumbnail_id

    that's exactly where I have been hitting my head for the past few weeks. I have to mass upload hundreds of posts with a featured image.. Because it's not a migration from another wp site it can't work with thumbnail_id, which assumes there's already a relationship established via an ID between post and image.

    Still scratching my head on how to accomplish this...

Topic Closed

This topic has been closed to new replies.

About this Topic