Last active
October 4, 2024 20:01
-
-
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 hidden or 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
// Use acf as image array | |
<?php | |
$image = get_sub_field('FIELD_NAME'); | |
$image_url = $image['sizes']['CUSTOM_SIZE']; | |
?> | |
<img src="<?php echo $image_url; ?>"> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment