This filter can be used to set the size of the image used for the og:image meta tag that All in One SEO outputs.

Arguments (1)

  1. $imageSize (string) – The size of the image All in One SEO outputs. Defaults to “fullsize”.

Example code snippet

The code snippet below is just an example of how this filter can be used. In the example below, All in One SEO is outputting an og:image that uses the large size image.

add_filter( 'aioseo_thumbnail_size', function( $imageSize ) {
    return 'large';
} );

The accepted values are –

  1. fullsize
  2. large
  3. medium
  4. thumbnail
  5. an array specifying the width and height in pixels (e.g. [ 200, 300 ] )