• Resolved greenhoe

    (@greenhoe)


    Hi,

    I have a video blog and was wondering if there is a way to save only the featured image size rather than the full 1080p file? For every video (youtube) that I use in a post it created the full size video thumbnail at 1080p and than creates my featured image size.

    I only need my featured image size so it would be nice if I can setup so it only creates that. Is there a way to do so?

    // add Thumbnail option
    add_theme_support('post-thumbnails', array('post', 'svg'));
    set_post_thumbnail_size(275, 154, true);

    https://www.ads-software.com/plugins/video-embed-thumbnail-generator/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Kyle Gilman

    (@kylegilman)

    Sorry for the late reply. Thanksgiving got in the way.

    First, you’re making thumbnails from YouTube videos? How do you do that? I didn’t think it was possible with my plugin.

    My advice would be that you just not worry about the additional larger images, but I think there is a solution if it’s really important to save those kilobytes. You could modify the plugin like this:

    Add these lines after line 3003 elseif ( $success ) { //no existing post with this filename

    $editor = wp_get_image_editor( $final_posterpath );
    if ( ! is_wp_error( $editor ) ) {
        $editor->resize( 275, 275, false );
        $editor->save( 'new_image.jpg' );
    }

    That should resize the image to 275 pixels wide and whatever the appropriate height is for the aspect ratio of the video. In most cases that will be 154. I haven’t tested this out so be careful of course.

    Thread Starter greenhoe

    (@greenhoe)

    Ah I’m sorry this was posted under the wrong plugin, thank you for the help though.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Save only the featured Image rather than full size’ is closed to new replies.