Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
How To Use Responsive Images in WordPress using Advanced Custom Field's image field and the wp-tevko-responsive-images Plugin
$image = get_field('your_image_field_name');
$atts = array(
'imageid' => $image,
'size1' => '0',
'size2' =>'600',
'size3' =>'1000'
echo tevkori_responsive_shortcode($atts) ; ?>
<figcaption><?php echo get_cat_name($value); ?></figcaption>
Copy link

funzeye commented May 31, 2014

This is the code I use in conjunction with the

  1. Advanced Custom Fields WordPress plugin -
  2. The tevko responsive image plugin -

You will need to create an image field in ACF and be sure to set the 'return value' to Image ID.

(You can ignore the figure elements above, just left them in there to help give some context to the important code - from lines 3 to 10)

Some background on the tevko responsive image plugin:
Note that in this article Chris uses the old version of Picturefill, while the Tevko plugin now uses the Picturefill 2.0 code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment