facetwp index new media

<?php

/** add image indexing on initial upload */
add_action( 'add_attachment', function( $post_ID) {    
    FWP()->indexer->index( $post_ID );
} );