Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

How To Use Responsive Images in WordPress using Advanced Custom Field's image field and the wp-tevko-responsive-images Plugin

View WordPress Advanced Custom Field - Responsive Image Field
1 2 3 4 5 6 7 8 9 10 11 12
<figure>
<?php
$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>
</figure>
Owner
funzeye commented

This is the code I use in conjunction with the
1) Advanced Custom Fields WordPress plugin - http://www.advancedcustomfields.com/
2) The tevko responsive image plugin - https://github.com/tevko/wp-tevko-responsive-images

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: http://css-tricks.com/hassle-free-responsive-images-for-wordpress/#comment-1581891
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
Something went wrong with that request. Please try again.