Put the following code in the theme theme file.
function remove_vc_prettyphoto(){
wp_dequeue_script( 'prettyphoto' );
wp_deregister_script( 'prettyphoto' );
wp_dequeue_style( 'prettyphoto' );
wp_deregister_style( 'prettyphoto' );
}
add_action( 'wp_enqueue_scripts', 'remove_vc_prettyphoto', 9999 );
I tested this on my installation and it works flawlessly.
What it does is dequeues and unregisters the javascript and stylesheets that Visual Composer creates and registers in all PHP plugin files for various template elements and shortcodes that use prettyPhoto lightbox.
Parameter "9999" provides that deletion / deregistration occurs well after the previous registration or registration occurred earlier when loading the plugin. Any number will do, but the larger the number, the better.
source
share