• I have some sites which were created using WP All Import and an automated featured image tool. All Import is fed posts which were exported and include external URLs to the old site as the src attribute, so I use a plugin to download those locally and make them the featured image, but the plugin leaves the image tag in the post content resulting in double images in the post.

    In the past I’ve used CSS to set display none for all images included in the post body content, but I can’t help think there must be a better way. Is there a plugin which will simply strip all image elements from post body content?

    I have seen solutions which involve adding code to functions.php but I don’t want to do that because that file always gets overwritten when WordPress updates.

Viewing 2 replies - 1 through 2 (of 2 total)
  • lisa

    (@contentiskey)

    if you need to add some php code you can use a plugin like https://wordpress.org/plugins/code-snippets/ instead of modifying the functions.php file.

    Thread Starter wpbroken2much

    (@wpbroken2much)

    @contentiskey do you know of a plugin that does that? I also have a plugin which prepends a button featuring an image to post content when the post loads, so this needs to be done in a way that won’t strip that image either. Ideally, there should be a plugin out there which will scan post entries in the database and remove image HTML from them, but I can’t find one.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How Do I Delete Images from Post Content’ is closed to new replies.