Home › Forums › ACF PRO › Using variable (image-id) in function »awesome_acf_responsive_image« › Reply To: Using variable (image-id) in function »awesome_acf_responsive_image«
It looks like the function requires an ID so using your code you would just do
<?php
$field = get_field('header-work');
$image = $field['image']; //acf-image-field is set to return id
?>
<section>
<div class="image">
<img class="img-fluid" <?php awesome_acf_responsive_image($image,'thumb-640','2560px'); ?>>
</div>
</section>
If that does not work then you should ask the developer of the plugin.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.