Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Agustin Mouratoglou amouratoglou

🎯
Focusing
View GitHub Profile
@galengidman
galengidman / index.php
Created Mar 28, 2014
get ACF image size URL by ID
View index.php
<?php
// first, get the image ID returned by ACF
$image_id = get_field('my_image_field');
// and the image size you want to return
$image_size = 'thumbnail';
// use wp_get_attachment_image_src to return an array containing the image
// we'll pass in the $image_id in the first parameter