Index: src/bp-core/bp-core-attachments.php
===================================================================
--- src/bp-core/bp-core-attachments.php	(revision 12510)
+++ src/bp-core/bp-core-attachments.php	(working copy)
@@ -483,8 +483,10 @@
 	 *                              Defaults to 'cover-image'
 	 *     @type string $file       The name of the file.
 	 * }
+	 *
+	 * @param string $data type of data to fetch(url or path).
 	 */
-	$pre_filter = apply_filters( 'bp_attachments_pre_get_attachment', null, $r );
+	$pre_filter = apply_filters( 'bp_attachments_pre_get_attachment', null, $r, $data );
 	if ( $pre_filter !== null ) {
 		return $pre_filter;
 	}
