I think you might be jumping the gun with actively discarding the data here. What if next month trolls go away, you change your mind, and want all those featured images back?
I would just suppress them on front end by editing template and making thumbnail output conditional or filtering API with something like this:
if ( ! is_admin() ) {
add_filter( 'get_post_metadata', function ( $null, $post_id, $meta_key ) {
if ( '_thumbnail_id' === $meta_key ) { // add check for date or whatever
return false;
}
return $null;
}, 10, 3 );
}
This way you retain all the existing data, just prevent featured images from showing. If you change your mind just remove the check and everything is back.
Related Posts:
- show first 3 thumbnails of posts in different sizes [closed]
- Missing feature image link function
- How do I change/modify the_post_thumbnail(); html output?
- Automatically set the featured image
- Get recent posts with thumbnail
- How to display the_post_thumbnail if a post has one or otherwise display the first image in a post?
- Add options to featured image
- Linking thumbnail to full size image
- Generating Responsive Background Image Sizes in PHP
- Why are image thumbnails cropped proportionally (not per dimensions)?
- Most elegant way to enqueue scripts in function.php with foreach loop
- Add a Post Thumbnail to an RSS Feed with custom size
- Automated mark posts as featured every day
- Make WordPress size and name images for Retina.js
- get excerpt without images
- the_post_thumbnail fallback using hooks
- Display height and width properties with the_post_thumbnail() or related function
- Display 4 chronological posts starting with a random post
- Removing the first image in content
- How to set the jpg image compression for specific thumbnail sizes?
- Function to auto-set a featured image that is already in use
- How to make thumbnail image fit into a div where image dimentions are completely different?
- When to use an if statement after get_posts?
- img width and height attributes being set by get_the_post_thumbnail
- Get the 5 lastest Featured Posts from a category
- How to Display Image Meta underneath EVERY image in EVERY post
- Update Content based on expiration time or queued processing
- Change size and crop medium_large images
- Woocommerce Attributes pulling in wrong data
- Getting Featured Image Caption to Only Show if Populated
- wp_get_attachment_image function size argument not working if I also add a custom class
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Post thumbnail not showing in WP admin area for custom post type
- Set the background to a default image if there isn’t a specified “featured image”
- Backstretch.js and thumbnail sizes to reduce loading time
- set_post_thumbnail when user is not logged in
- Logged in user ID as post ID
- How to stop twenty fifteen theme from cropping featured images?
- Create a new query in function.php to filter blog posts
- Can you put a condition on add_image_size() depending on the width of the uploaded image?
- Can’t generate thumbnail images
- How can this crude function be improved?
- Redirect to another page using contact form 7? [closed]
- height should be set to auto to avoid pixelation in the post thumbnail function
- WordPress function, Run using Crontab
- Check if the image size is available and if not use ‘full’ image size
- Test if a post exists by category and date
- Turn get_posts as string into an array for use in theme admin options
- is there a way to remove featured image from blog page and single page
- How to hide image-url if no attachment?
- Can set_post_thumbnail be used to remove a thumbnail?
- Can’t locate custom image sizes defined by child theme
- Else/If Statement to Display Photo Descriptions
- How to add a new image size and apply it to posts only?
- How to use get_posts() function in functions.php
- Display a random tag but using cron to control frequency of change
- Show Featured Image in else statement
- If no author posts, echo out some text
- resizing of thumbnails not working
- Featured Image keeps cropping
- show all the posts thumbnails
- struggling with syntax for the_post_thumbnail();
- include w_thumbnail_src in function?
- Can/should we delete wordpress cron jobs with no action?
- Run function with schedule is not working correctly
- Add Featured Image to Existing Post
- Which filter fires upon setting a featured image
- not outputting medium size image URL
- Wp_Schedule_Event every few minutes doesn’t work
- How to put 2 php codes in functions.php without site crashing
- Can You Set A Minimum Image Dimension For Resizing Images?
- Exclude admins from query get posts
- How to link all featured images to custom url in single.php for only non-logged-in users?
- Featured image on archive page based on post type
- Printing medium sized image
- Sticky – Featured Image
- Update (a function) post’s featured image as soon as $image_url changes
- Frontend Feature image upload not work
- Best way to add image to recent posts widget?
- Slider Thumbnail Size Issue [closed]
- same get_posts function works diffrently in tag.php and functions.php
- How to exclude posts with empty and non-existent relational custom field with meta_query?
- Display most popular posts
- insert thumbnail image from php script
- Can’t put a hyperlink on Featured Post’s Image
- Apply height and width for the_content() inside youtube video tag
- Set thumbnail from URL, by grabbing image in functions.php
- add_theme_support not outputting thumbnails
- Full size image option removing problem
- Way of getting queried loop before the query with a filter hook?
- image_size with respect to aspect ratios
- Remove default Image Sizes
- How to I add count of custom posts listed in a post as a prefix to its title
- Is mytheme_post_thumbnails() still necessary?
- Add attribute to featured image with filter (wp_get_attachment_image_attributes)
- Generate and upload screenshot as featured image for user-submitted post
- Link on post title only if post have content
- Second featured image only shows in metabox preview after saving a post in the wordpress editor
- Cron Register everytime if i reload admin if i pass some extra argument in wp_schedule_event function
- No src and sizes attributes present on WordPress thumbnail images; the smallest image size is loaded irregardless of viewport size