Picture Element Thumbnails

0

This plugin introduces a couple of nifty functions to replace the_post_thumbnail() & get_the_post_thumbnail() in exchange for the responsive picture element. Use: get_the_post_pictu

Version
Last updated
Active installations
WordPress Version
Tested up to
pa_tag
Rating
Total ratings
This plugin is outdated and might not be supported anymore.

Description

This plugin introduces a couple of nifty functions to replace the_post_thumbnail() & get_the_post_thumbnail() in exchange for the responsive picture element. Use:

get_the_post_picture(
    $fallback_image_size,
    array(
        $breakpoint_1=>$image_size_1,
        $breakpoint_2=>$image_size_2
    )
    [, $id, $atts]
);

For example:

<?php echo get_the_post_picture(
    'single-featured-sm',
    array(
        '(min-width:768px)'=>'single-featured-md',
        '(min-width:992px)'=>'single-featured-lg',
        '(min-width:1200px)'=>'single-featured'
    )
); ?>

While this says 4.0 for minimum version, I would wager it’ll be fine on most older installations.