The Movie Database サポート

How can I get only the logo of the movies and tv I only want the logo like this => https://www.themoviedb.org/t/p/original/izvZm6zHyidvhktODSGjnOFldKu.png

4 replies (on page 1 of 1)

Jump to last post

Hi @elmanci2, are you asking about this on the API?

Yes

Ok, I've moved this post into the API forum.

You can get the logos by calling the /images method, and looking at the returned logos filed.

Make sure to read the docs around images:

Hi! This is my solution for this problem, coded in Vue, but it's basically the same as any other js file :

const getImages = (movie_id) => {
            const images = ref([]);
            const main_logo = ref("");
            const xhr = new XMLHttpRequest();
            xhr.open("GET", `https://api.themoviedb.org/3/movie/${movie_id}/images?api_key=${env.apikey}`);
            xhr.onload = () => {
                images.value = JSON.parse(xhr.responseText).logos;          // will return an array of logos in many different languages
                const en_logos = images.value.filter((logo) => {                   // takes only the English logo
                    return logo.iso_639_1 == "en"
                })
                main_logo.value = "https://image.tmdb.org/t/p/original/" + en_logos[0].file_path;
            }
            xhr.send();
            return main_logo;
        }

// Sample Function Call
        const main_logo = getImages("945961");

        watchEffect(() => {
            console.log(main_logo.value);
        });

映画やテレビ番組が見つかりませんか?ログインして作成してください。

全般

s 検索バーに移動する
p プロファイルメニューを開く
esc 開いているウィンドウを閉じる
? キーボードショートカットウィンドウを開く

メディアのページ

b 戻る(または該当する場合は親に)
e 編集ページに行く

テレビ番組のシーズンのページ

(右矢印)次のシーズンに行く
(左矢印)前のシーズンに戻る

テレビ番組のエピソードのページ

(右矢印)次のエピソードに進む
(左矢印)前のエピソードに戻る

全ての画像のページ

a 画像追加ウィンドウを開く

全ての編集ページ

t 翻訳選択を開く
ctrl+ s フォームを送信する

ディスカッションのページ

n 新しいディスカッションを作成する
w 監視ステータスを切り替える
p 公開/非公開を切り替える
c 閉じる/開くを切り替える
a アクティビティを開く
r ディスカッションに返信
l 最後の返事に行く
ctrl+ enter メッセージを送信する
(右矢印)次のページ
(左矢印)前のページ

設定

このアイテムを評価したり、リストに追加したりしたいですか?

ログイン

メンバーではありませんか?

登録してコミュニティに参加