• Resolved codebot

    (@codebot)


    Hi,

    After upgrading to v4.x, there does not seem to be an option to manually override the og image size (original image is used). This has made it more difficult to manage file sizes for social media sharing – often the original image is too large (even after WP 5.3 updates).

    Are there any plans for including such option in the near future?

    • This topic was modified 5 years ago by codebot. Reason: fix typo
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Hello!

    In v4.0, we rewrote the image fetcher from the ground up to be a generator. With that, we implemented detection features that’d allow images to be downsized when they’re deemed too large. We wanted this to be a no-brainer feature, but thanks to our users, we soon discovered we also needed to check for the image filesize.

    The filesize detection can cause The SEO Framework to ping external asset servers multiple times per page request, which will drastically slow down your site. So, we forwarded the issue to the WordPress Core team. For more information, see this issue.

    In that issue, I just added your suggestion for allowing users to select the image sizes. There is a new update coming in December for the v4.0 release since we found that feeds must be indexed for Google Podcasts to work. So, you can expect that feature sooner than later.

    Until then, there is a new filter you can use. It looks a bit like this:

    add_filter( 'the_seo_framework_image_generation_params', function( $params = [] ) {
    
    	$params['size'] = 'my_preferred_image_size';
    
    	return $params;
    } );

    In that filter, you’ll want to change my_preferred_image_size to a registered size you deem fit.

    I hope this explains the lot. Thank you for the feature suggestion!

    Thread Starter codebot

    (@codebot)

    Hi,

    Great, this is extremely useful.
    Thanks for the quick response, and a great plugin!

    • This reply was modified 5 years ago by codebot.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Option to specify og image size’ is closed to new replies.