<?php
/** add image indexing on initial upload */
add_action( 'add_attachment', function( $post_ID) {
FWP()->indexer->index( $post_ID );
} );
Code snippets for FacetWP
<?php
/** add image indexing on initial upload */
add_action( 'add_attachment', function( $post_ID) {
FWP()->indexer->index( $post_ID );
} );