It was some digging but I think I found the solution:
The following code you can put in your theme’s functions.php
I have not tested this but it should work.
Please let me know how it goes.
/**
* Never fetch the DFI image while doing Postie mail scan
*/
function dfi_postie_pauze( $mimeDecodedEmail ) {
add_filter( 'dfi_thumbnail_id', '__return_null', 100 );
return $mimeDecodedEmail;
}
add_filter( 'postie_post_pre', 'dfi_postie_pauze' );
/**
* When Postie is done restore default DFI behavior
*/
function dfi_postie_play( $details ) {
remove_filter( 'dfi_thumbnail_id', '__return_null', 100 );
return $details;
}
add_filter( 'postie_post_pre', 'dfi_postie_play' );
Thread Starter
hareln
(@hareln)
Hi,
First, thank for your answer.
I pasted this code but I think it’s didn’t work. The default picture is still the featured image and the picture that I uploaded via postie just include in post.
Did you try a new upload?
I should have specified. This should only work on new posts.
There is no way to fix older posts.
Thread Starter
hareln
(@hareln)
Yes. I tried with a new upload. and it’s didn’t work.
<?php
/**
* Never fetch the DFI image while doing Postie mail scan
*/
function dfi_postie_pauze( $mimeDecodedEmail ) {
add_filter( 'dfi_thumbnail_id', '__return_zero');
return $mimeDecodedEmail;
}
add_action( 'postie_session_start', 'dfi_postie_pauze' );
/**
* When Postie is done restore default DFI behavior
*/
function dfi_postie_play( $details ) {
remove_filter( 'dfi_thumbnail_id', '__return_zero' );
return $details;
}
add_action( 'postie_session_end', 'dfi_postie_play' );
New attempt. Again let me know if a new email post works or not.
Thread Starter
hareln
(@hareln)
it’s work! thanks a lot!!