That’s a tough question! ??
Try this..
add_action('wp','generate_customize_post_images');
function generate_customize_post_images()
{
$generate_settings = wp_parse_args(
get_option( 'generate_blog_settings', array() ),
generate_blog_get_defaults()
);
if ( 'post-image-above-header' == $generate_settings['post_image_position'] ) :
add_action( 'generate_after_entry_header', 'generate_blog_post_image' );
add_action( 'generate_before_content', 'generate_blog_post_image' );
if ( function_exists('generate_page_header_post_image') ) :
add_action( 'generate_after_entry_header', 'generate_page_header_post_image' );
add_action( 'generate_before_content', 'generate_page_header_post_image' );
endif;
endif;
}
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
.inside-article > .post-image:first-child {
display: none;
}
.entry-header + .post-image {
margin-top: 2em;
}
@media (max-width: 768px) {
.inside-article > .post-image:first-child {
display: block;
}
.entry-header + .post-image {
display: none;
}
}
Adding CSS: https://generatepress.com/knowledgebase/adding-css/