admin管理员组文章数量:1201412
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!
本文标签: pods frameworkHow to get the url of an Image with id
版权声明:本文标题:pods framework - How to get the url of an Image with id 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1738631229a2103757.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论