Home › Forums › Front-end Issues › Specific-size image from another page › Reply To: Specific-size image from another page
From the look of your code, you have the field set to return the URL of the image.
To do it differently you would need to alter the return value of the field to return an array, which would likely mean altering the code everywhere that this field is used.
Instead of doing that I would get the unformatted value from ACF by using false
as the 3rd argument
$page_image = get_field('title', $page_title->ID, false);
And then I’d get the image I want using
$image = wp_get_attachment_image_src($page_image, 'the size you want here');
?>
img src="<?php echo $image[0]; ?>" />
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.