• Resolved kristianhaa

    (@kristianhaa)


    Hi,

    we think that your latest update conflict with: core WP function ‘wp_update_attachment_metadata()’ that makes the thumbnail and featured images not be displayed even if the image is still there.

    We need to add a new function for that, in order to make it work.

    Please look into it.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    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

    Thread Starter kristianhaa

    (@kristianhaa)

    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

    Plugin Support Amin – WPMU DEV Support

    (@wpmudev-support2)

    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

    Thread Starter kristianhaa

    (@kristianhaa)

    Thanks @umeshsingla !

    It seems to have solved the issue.

    Thanks again.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Thumbnail and Featured Image not Showing after last WP Smush update’ is closed to new replies.