How to get the url of an Image with id
If I have the id of an image media file, how can I get the url, to download it via rest api? I'm using the Pods Plugin to create my own objects. thes have images included i want to download via rest api.
I tried
wp_get_attachment_image_src( $imgid, $default );
or
wp_get_original_image_path($imgid);
all came back empty I got the id with
$imgid = $designpod-fields( 'app_logo' )→id;
i also tried
$imgid = $designpod-fields( 'app_logo' )-id;
$design[app_logo] = $designpod-pods_image_url($imgid, null );
also not working /returns empty.
that also seems to return the wrong id. it returns 75, but if i look it up in media, it has 76 as id. Sorry, I have no clue about PHP - i'm a C# programmer. Maybe anyone can help me with this.
Thanks!
Topic pods-framework images Wordpress
Category Web