apply_filters ( 'jetpack_top_posts_widget_image_options', array $get_image_options )

Top Posts Widget Image options.

Source file: modules/widgets/top-posts.php

View in GitHub



(array) { Array of Image options.


Since: Jetpack 1.8.0


You can use this filter to change the size of the images displayed in the Top Posts Widget. In the example below, we’ll change the size to 600px.

function jeherve_custom_thumb_size( $get_image_options ) {
        $get_image_options['avatar_size'] = 600;
        return $get_image_options;
add_filter( 'jetpack_top_posts_widget_image_options', 'jeherve_custom_thumb_size' );

You’ll also need some CSS to make sure the size is correct on all devices:

.widget_top-posts .widgets-list-layout li > a {
    width: 40%;
.widget_top-posts .widgets-list-layout img.widgets-list-layout-blavatar {
    max-width: 240px;
    width: 100%;
.widget_top-posts .widgets-list-layout div.widgets-list-layout-links {
    max-width: 100%;
    width: 55%;
@media only screen and (max-width: 1019px) {
    .widget_top-posts ul.widgets-list-layout {
        max-width: 600px;
        margin: 0 auto;
    .widget_top-posts .widgets-list-layout div.widgets-list-layout-links {
        font-size: 24px;

If you’d rather have rectangular images, you can do the following:

function jeherve_custom_top_posts_rectangular_images( $get_image_options ) {
        $get_image_options['width'] = 600;
        $get_image_options['height'] = 200;
        return $get_image_options;
add_filter( 'jetpack_top_posts_widget_image_options', 'jeherve_custom_top_posts_rectangular_images' );

Have a note to contribute?

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s