键盘快捷键
高级搜索
So I am using the API to get movie details but how can i get the movie poster to display on my movie card on my project website is there any way
Hi,
First query the API configuration details : see here https://developer.themoviedb.org/reference/configuration-details
"images": { "base_url": "http://image.tmdb.org/t/p/", "secure_base_url": "https://image.tmdb.org/t/p/", "backdrop_sizes": [ "w300", "w780", "w1280", "original" ], "logo_sizes": [ "w45", "w92", "w154", "w185", "w300", "w500", "original" ], "poster_sizes": [ "w92", "w154", "w185", "w342", "w500", "w780", "original" ], "profile_sizes": [ "w45", "w185", "h632", "original" ], "still_sizes": [ "w92", "w185", "w300", "original" ] }, ... }
Then, build the complete url of your poster (php):
$url = $config['images"]["secure_base_url"] . $config["images"]['poster_sizes"]["w500"] . $poster_path; // 500px wide image
找不到电影或节目?登录并创建它吧。
登录
注册
想给这个条目评分或将其添加到片单中?
还不是会员?
注册加入社区
iboy44 的回复
于 2024 年 11 月 02 日 5:40上午
Hi,
First query the API configuration details : see here https://developer.themoviedb.org/reference/configuration-details
Then, build the complete url of your poster (php):