We're merging with GenerateBlocks! Learn more here.

[Support request] WPSP & Imagify

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support WPSP & Imagify

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #15385


    I recently noticed that not all images on my site are showing with the <picture> tag around them.
    The images from my theme GP Premium work fine, but the images from WPSP do not have the <picture> tag around them.
    I use WP Rocket and Imagify. The Imagify option to display the <picture> is used.

    I made a short 4 minute video explains this.

    Thank you for your time.


    Hi there,

    This is likely due to how WPSP resizes images.

    Instead of using the built-in image resizing options, I would do this: https://wpshowposts.com/support/topic/show-posts-images-not-working/#post-8324


    Hi Tom,

    We definitely made progress on this.

    This filter works great for 5 of the 8 WPSP grids I’m using. By this I mean, if I do not specify an image size in WPSP, then the image is served with the <picture> tag as expected.

    However, I still have 3 WPSP grids do not use the default image size.

    This filter only sets the default size, and so anytime I set the size in WPSP it does not use the <picture> tag.


    What do you mean by “set the size in WPSP”? Are you using the width/height controls for those lists?


    Hi Tom,

    I don’t understand you question.
    But it’s okay I made a very short video explaining the issue I’m having.

    Thank you very much, David


    Hi David,

    That makes sense, as our resizer kicks into gear when you specify custom image sizes in the list. That image resizer typically won’t work with plugins like filter the output of normal featured images, which are output when no custom sizes are added.

    This is a tricky issue as of right now, as there’s no way to target individual lists with that filter.

    However, you can see in the next version we’ve added a $settings variable to the filter: https://github.com/tomusborne/wp-show-posts/blob/release/1.2/inc/functions.php#L193

    So if you make that change to your current version, you’d be able to do this:

    add_filter( 'wpsp_default_image_size', function( $size, $settings ) {
        if ( 123 === $settings['list_id'] ) {
            return 'size-for-123-list';
        if ( 456 === $settings['list_id'] ) {
            return 'size-for-456-list';
        return 'medium'; // Size for everything else.
    }, 10, 2 );

    Let me know if you need more info 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.