• Resolved sjeslis

    (@sjeslis)


    In my specific import I’ve included an image which is marked to be my featured image.

    Within the post’s text I want to create an HTML image using that uploaded image file as well using HTML img class, etc.

    How do I get the URL of the imported image/file and get it in time into the post before it’s posted?

    I tried wrapping pmxi_attachment_uploaded to return back the $filepath but I’m guessing the timing isn’t right.

    https://ww.wp.xz.cn/plugins/wp-all-import/

Viewing 1 replies (of 1 total)
  • Plugin Author WP All Import

    (@wpallimport)

    Hey Sjeslis,

    You would actually only be able to do this as a post-processing function, since the images are processed after the post content is created.

    On your import template on the post content include a placeholder string on the place where the image url would be placed.

    You can attach your function to the “pmxi_gallery_image” action. Your function would get the url for the image, and query the post content. Then it is a simple process of replacing the placeholder string with the actual URL, and updating the post content.

Viewing 1 replies (of 1 total)

The topic ‘Include Attachment/Image URL In Post's text’ is closed to new replies.