apply_filters ( 'jetpack_display_posts_widget_image_params', array $args )

Allows setting up custom Photon parameters to manipulate the image output in the Display Posts widget.

Source file: modules/widgets/wordpress-post-widget/class.jetpack-display-posts-widget-base.php

View in GitHub



(array) Array of Photon Parameters.


Since: Jetpack 3.6.0


You can use this filter to customize the Photon parameters used for each image in the Display Posts widget on your site.

In the example below, we’ll force all images to be 200*100px and black and white:

function jeherve_display_posts_custom_image_params() {
    return array(
        'resize'  => '200,100',
        'filter'  => 'grayscale',
add_filter( 'jetpack_display_posts_widget_image_params', 'jeherve_display_posts_custom_image_params' );

Have a question?

Comments are closed for this article, but we're still here to help! Visit the support forum and we'll be happy to answer any questions.

View support forum