• Hi!
    How to import thumnails for my custom tax?
    I can t import values of csv_post_thumbnail column
    what s the reason?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Jason Judge

    (@judgej)

    Can you provide some further details. What are you putting in this thumbnail CSV column? How are your thumbnails being managed now – a plugin, the theme?

    Thread Starter Nick52

    (@nick52)

    1. What are you putting in this thumbnail CSV column?
    I put full link on my pic in my library http: // mysite/wp-content/uploads/mypicture . jpg

    2. How are your thumbnails being managed now – a plugin, the theme?
    in simpliest way. I appoint the thumb to the post in admin screen ??

    Thread Starter Nick52

    (@nick52)

    In next topic may be explanation.. May be trouble in creating duplicates.

    Plugin Author Jason Judge

    (@judgej)

    So thumbnails are supported by some (or most) themes, and utilise the “featured image” for a post. If it is called anything other than “featured image” in the post admin page, then it is a feature of the theme or a plugin, and not core WP.

    Notes on how this could work:

    1. The URL or file path is included in the CSV.
    2. The image at that URL or path is added to the post as an attachment.
    3. The ID of the attachment is added to the post metadata “_thumbnail_id”.

    That should add thumbnails by URL. We could also support the numeric ID for when we know it, avoiding the attachment stage.

    Some details here:

    https://wordpress.stackexchange.com/questions/94739/adding-post-thumbnail-in-programatically-inserted-post

    Something to be aware of here: WP does not store the ultimate source of attachments it is uploading. This means we cannot know if a featured image has already been uploaded or not. So if the same image is present as a thumbnail in multiple CSV rows, each post (a post per row) will get its own copy of the same image uploaded. This is not ideal, and I have seen large WooCommerce sites with many duplicate images on product variations grind to a halt because of this (uploaded with the WC CSV import suite).

    One way to work around this, is to add the source metadata to the image when it is attached. Then we can search that field to see if the image has already been uploaded, then reuse that as the featured image.

    Not sure when I’ll get around to this, but just noting down some things to be aware of and possible ways forward.

    • This reply was modified 8 years, 1 month ago by Jason Judge.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to import thumbnails?’ is closed to new replies.