Last active
November 8, 2023 20:12
-
-
Save cccamuseme/13c3d94df5778cab8def4cf8bd624953 to your computer and use it in GitHub Desktop.
Display ACF image using custom image size - set acf to return image ID
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img src="<?php echo wp_get_attachment_image_src( get_sub_field('acf_image_field'), 'custom-image-size' )[0]; ?>" alt="<?php echo $img['alt']; ?>" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment