Try removing (image), like this:
<?php
$content = get_the_content();
$content = preg_replace("/<img[^>]+\>/i", " ", $content);
$content = apply_filters('the_content', $content);
$content = str_replace(']]>', ']]>', $content);
echo $content;
?>
Related Posts:
- Find the post an attachment is attached to
- How do I detach images from posts?
- How do I create Comma Separated list of attached image ids?
- Get post embedded image caption
- Load post attached images on a single page site with fancybox
- Set size for attachments
- I have a site where attachments in the wp_posts table have guid values of guid, how did this happen?
- Get all attachment by post excluding featured and content inside
- Get attachments for posts that belongs to a specific category
- How would one change the default url structure of attachments?
- Upload attachment from external site
- How to get the next and previous image title from attachment or gallery?
- Delete attached images from posts
- Stop images from being displayed on the front-end of the site
- Broken images after importing posts and opening in Gutenberg
- Turn a URL into an Attachment / Post ID
- Stop WordPress automatically adding tags to post content
- Add custom Attachment Display Setting for images
- Is it possible to Schedule Attachments in WordPress?
- what types of order can I pass to get_posts() via orderby?
- Delete the original big size image after upload and leave only 3 images crunched by media gallery
- media_handle_upload for local files?
- delete post also attachments
- Replacing all attachment links in post with media file link
- How to hide the Text Area in the Post Edit screen
- upload image in a meta box
- How do I use element instead of tags in WordPress post content having webP support?
- How can I export WordPress posts’ attachments?
- Unattaching images from a post
- upload featured image from front end using wordpress add media button
- Limit amount of results returned
- Remove image from post also removes photo from media library
- post_parent is 0 when uploading new files
- All my inserted images gets a link to the full image even if it is already full size image
- Easy way to delete 70k posts and attached media?
- Remove permalink from images when inserting into post
- How to get only text from wordpress post content?
- Get the url of the full sized attachment image using post ID?
- Get all images out of the posts content
- How to access featured image?
- how can I put an image in a post with original size
- How to retrieve the postID in a “image_send_to_editor” hook function?
- Comma separated all attached image ID numbers except featured image ID number
- Modify Image Source With The_Content Filter?
- Featured Image uploaded, attached and set but only appearing in the media library
- Format the Layout of Images In The Edit Post Textarea?
- Insert woocommerce products programmatically with featured image and gallery
- CSS: How can I show a photo beyond the template’s column, but contained within the browser window? [closed]
- Prevent Delete Attachment by URL or When Submit
- wp-cli post create & media import issues
- Automatically attach image to post if they have the same title
- Show only posts with images and a fixed amount of posts
- Filter only the text in the_content
- If statement to check if post has image
- Remove Featured Image & All Media Uploaded to the Post
- What are the benefits of setting a “featured image” for a WP blog post?
- preg_replace not removed “class”
- How to only publish posts with image in it
- Posts page not showing correct image
- Images showing up in Post Editor, but not in Published Post
- How to allow multiple thumbnail upload for Posts?
- get_children returns older images
- How to display post title inside thumbnail?
- How to remove text and retain in caption image using the_content function
- How to retrieve certain number of images from a wordpress post?
- Change the background of each post according to the category
- wordpress post not showing my “” text>?
- Inserting Media to WordPress Posts
- Author Avatar as default first image
- How To Download WordPress Audio Attachments
- Attachment image single page
- Only show featured image on exerpt and exclude images in post
- how can display a post on home screen without images
- All images on one line for each post
- Changing The Default Header POST Title and Description text by category in wordpress
- Site/Post preview is not working on all social media
- Delete media from the post but keep my featured image and post
- Pinterest button shows image options from different posts
- Unable to delete attached file from folder programmatically
- Thumbnails and images in the blog post are not loading
- Modified core/image rendering not showing in posts – only on pages
- Blog images not showing on homepage
- Unable to get all the Posts Attachments
- Integrate video and iframe in a post type gallery
- how to create other sizes of original image in one go wordpress uploads
- Output wp_link_pages as raw url
- Embed image in post from external url
- Is possible to do this from function.php
- How to get images only attached from edit post page
- WordPress Media URLs?
- SQL query to remove first image in all posts
- WordPress post text starts newline after 93 characters
- WP Gallery Image Page Issue When 2 galleries share one image
- How can I get a comment ID on Submit?
- Bulk Attach Or Insert Media To Post Without Opening Post Editor
- Why can’t I see my attachment page information for an image?
- Create post from form with image
- Assign custom class to post content images
- Import alt text in set_post_thumbnail
- website images getting corrupt automatically