diff --git a/lib/tasks/posts.rake b/lib/tasks/posts.rake index bc83af2e7d4..465808718f7 100644 --- a/lib/tasks/posts.rake +++ b/lib/tasks/posts.rake @@ -631,3 +631,21 @@ task 'posts:recover_uploads_from_index' => :environment do |_, args| end end end + +desc 'invalidate broken images' +task 'posts:invalidate_broken_images' => :environment do + puts "Invalidating broken images.." + + posts = Post.where("raw like '%