Hello @kristianhaa,
I’m sorry that this is not working correctly on your site. I’m checking on mine and I’m not able to replicate this issue.
Can you give me more details on who could I try to replicate? Where exactly can I see missing thumbnails?
kind regards,
Kasia
Hi Kasia,
Actually, in our system, the user will upload an image from a form in frontend and we have save that image and assigned it as featured image of the article.
I have used these WP functions to assigned featured image with thumbnails.
================================================
$filetype = wp_check_filetype( basename( $bannerimg ), null );
$attachment = array(
‘guid’ => $bannerimg,
‘post_mime_type’ => $filetype[‘type’],
‘post_title’ => preg_replace( ‘/.[^.]+$/’, ”, basename( $bannerimg ) ),
‘post_content’ => ”,
‘post_status’ => ‘inherit’
);
$attach_id = wp_insert_attachment( $attachment, $bannerimg, $new_webinar_id );
require_once(ABSPATH . “wp-admin” . ‘/includes/image.php’);
$attach_data = wp_generate_attachment_metadata( $attach_id, $bannerimg );
wp_update_attachment_metadata( $attach_id, $attach_data );
set_post_thumbnail( $new_webinar_id, $attach_id );
=================================================
So function wp_update_attachment_metadata() is not working when WP-Smush is active. So attachment information is not updated with thumbnail information and thumbnails is not showing. It happened after the last update, so we suspect it is causing the problem.
Can you look it?
Thanks
Hello @kristianhaa,
Thank you for additional info, I’ve passed this to developer for feedback what recent change in plugin might cause this issue.
As soon I will get more info I’ll get back to you.
kind regards,
Kasia
Hey @kristianhaa,
We have a new release 2.7.4.1
Can you please check if this fixes the issue you were having?
Thanks, Umesh
Thanks @umeshsingla !
It seems to have solved the issue.
Thanks again.