API Level 14 +
If you check out the source for ContactsContract.java, you can see that they introduced a new way to exclude the contact photo.
/**
* Boolean parameter that may be used with {@link #CONTENT_VCARD_URI}
* and {@link #CONTENT_MULTI_VCARD_URI} to indicate that the returned
* vcard should not contain a photo.
*
* @hide
*/
public static final String QUERY_PARAMETER_VCARD_NO_PHOTO = "nophoto";
The constant is hidden from the API (@hide), but you can still take advantage of it.
After you get your lookup key, you can get the "nophoto" vcard Uri using the following code:
String lookupKey = cursor.getString(
cursor.getColumnIndex(ContactsContract.Contacts.LOOKUP_KEY));
Uri vcardUri = ContactsContract.Contacts.CONTENT_VCARD_URI
.buildUpon().appendQueryParameter("nophoto", String.valueOf(true))
.build();
Uri uri = Uri.withAppendedPath(vcardUri, lookupKey);
Pre API level 14
Your only solution would be to build your own vcards using the contact information.
This library might help.