1

I'm migrating some posts from Wordpress, and the posts on Wordpress have the images within a rich text field.

I need to reference the image separately to the rest of the rich text field - below the image there is usually one or two lines of text.

Is there any way I can either:

a. Reference the image in my Twig separately to the rest of the rich text field, or

b. Somehow split the rich text field so that the image url becomes an asset within Craft.

I'm using Feed Me to import the data into Craft and WP All Export to export the data out of Wordpress.

Thanks!

1

There is currently no native way to achieve this with Feed Me, short of writing your own PHP middle-man script which would parse the HTML, extract just the images, and append it to you XML/JSON.

We do plan on adding hooks later (potentially with examples) for this sort of scenario, as its quite common, but will not be until at least Feed Me 3.1.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.