Support

Account

Home Forums General Issues Is there a way to convert an attachment ID to an ACF Image Object?

Helping

Is there a way to convert an attachment ID to an ACF Image Object?

  • I have a page where I sometimes use the ACF gallery, but sometimes have to use the default WordPress attachments. Is there a function that can take a WordPress attachment ID, and convert it to an ACF image object with 'url', 'sizes' etc?

  • 
    $image = acf_get_attachment($post_id);
    
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.