Advanced Custom Fields Image Field returning ID instead of URL [closed]

When using ACF you should use the methods described in their website documentation because ACF does not store data in the normal WordPress way.

You can use the get_field or the_field functions to retrieve data from your fields.

For example to get data for your field ‘cover_photo’ you could do:

$user_id = get_query_var( 'author' )
$cover_photo = get_field('cover_photo', 'user_'.$user_id);
// Assuming you have this field set to return a url
echo "<img src="https://wordpress.stackexchange.com/questions/229180/$cover_photo">";

For more information see: https://www.advancedcustomfields.com/resources/how-to-get-values-from-a-user/

tech