Home Forums Backend Issues (wp-admin) After import, images in custom fields show as \"No Image Selected\"


After import, images in custom fields show as \"No Image Selected\"

  • Hey all,

    I imported a bunch of custom posts along with their custom ACF field groups, from my original site to a new site that I’m currently building.

    For imported fields that are of “image” type, in the WP admin it shows as “No image selected”, but the image is present on the front end, so the image is (mostly) correctly connected to the field on the post.

    I’m assuming there is some kind of metadata that is not connecting somewhere to show it correctly in the WP admin. Is there an easy fix for this? Thanks

  • Any import plugin used must be aware of ACF fields. ACF image fields use the post ID for the attachment. When importing the image the post ID will change. This is a frequent questions. The only plugin that I am aware of is to use WP All Export Pro to export and WP All Import Pro to import.

  • @hube2 Thanks! I’m aware of those plugins, but I unfortunately did not use them when I originally exported all my content from the old site to the new site. Our goal is to avoid having to re-import anything if we can, but if that’s the only course of action we’ll have to just do it.

    I also realized that I was wrong in my assumption of what the issue is. It’s not imported ACF data that’s the issue. The actual issue is when I create a new page, and I go to choose an image for any custom fields i have created, if I choose an image that was imported from my old site, ACF will not save the image to the field. It disappears after I click publish or update, and the field still says “no image selected”.

    If I upload a new image, or choose one that was added to the new site and not imported from the old, it will save the image and i will then be able to choose an image that previously would not work. Idk if this changes anything.

    Thanks again!

  • The images are likely in the DB with a different ID. What is required is to update every post that has the image field(s).

    I do not know why you cannot select and save an image that was imported. I have never seen that happen before. I not sure where to tell you to start looking.

    What did you use to do the export and import?

  • I just used the regular WordPress Import/Export for post data, and I imported/exported the field groups from ACF using the json export.

    I exported the posts by type, i did not export “all content” because i only needed some of the post data

  • I have never had any luck with the WP export/import, but I know it has always had issues with images when not exporting all content. If the images did make it to the new site and they are in the media library for the site then I haven’t got a clue why they would be deselected from the field after saving. It sounds to me like something is missing, possibly some of the meta fields that are associated with attachments/images.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.