The Movie Database Подршка

Google pushes for optimized images that result in faster page speeds. It seems like tmdb only allows poster-size high-res images.

Is there any plan to provide thumbnail images in tmdb? I use tmdb to insert a 150-pixel wide thumbnail poster in my movie review posts, but I end up linking to high-res images in tmdb.

Is there a better way for me to provide thumbnails that would result in faster page speeds?

Thank you for any advice. -mj lee https://soccermoviemom.com

5 одговора (на страни 1 од 1)

Jump to last post

Hey, mjlee101 there are thumbnail posters available. You can have sizes of 92 and 154 pixels you just need to change the pixel width dimensions you specify in the URL. So to do this simply put "w92" or "w154" like so https://image.tmdb.org/t/p/w92/kqjL17yufvn9OVLyXYpvtyrFfak.jpg , https://image.tmdb.org/t/p/w154/kqjL17yufvn9OVLyXYpvtyrFfak.jpg .

If you're using WordPress you can use this widget plugin I made and it does it for you. This is 3rd party and not endorsed or certified by TMDB. https://wordpress.org/plugins/movie-widget/

Hi Fredjuniordev, thanks for the reply and the reference to your wordpress plugin. But even if I specify the width as 150px, isn't the browser still taking the time to load a 117kb file? Meaning that I will never get a good page speed? Do true thumbnail-size images use less bandwidth than thumbnails rendered by your plugin?

I already do something similar in wordpress but I do it manually. To include a thumbnail poster in the beginning of my posts, I insert this HTML (brackets removed). (See the page at https://soccermoviemom.com/larbitro-2013/)

img class="alignleft size-medium" style="width: 150px;" src="https://image.tmdb.org/t/p/original/zqA3oRmWTUJZ67AOSwbFKprKtbd.jpg" alt="L'arbitro (The Referee) (2013)"

In your URL you have the image size specified as "original" so you will be downloading it at the highest quality then converting it to fit a pixel width of 150px. The URL should be "https://image.tmdb.org/t/p/w154/zqA3oRmWTUJZ67AOSwbFKprKtbd.jpg" Note: "w154" in the URL I gave you.

Using this you will be downloading an image of 154px and scaling it down to 150px. This produces an image size of 8.68 KB so less bandwidth as you required.

Yes, my plugin will render it at the correct thumbnail-size image, depending on what you specify in settings.

Hi @mjlee101,

The img tag you posted above is not using a thumbnail image. You're loading the original (full resolution) asset and simply setting a width. That is not what you should be doing. As per @fredjuniordev's comment, you should use a smaller image asset, lets go with the w154 size as an example.

<img src="https://image.tmdb.org/t/p/w154/zqA3oRmWTUJZ67AOSwbFKprKtbd.jpg" alt="L'arbitro (The Referee) (2013)" width="150">

This will load a image that is resized to 154 pixels wide, and is much smaller than the original asset (116949 bytes vs. 8895 bytes).

Edit: Ha! @fredjuniordev and I posted within the same minute. wink

Hello @fredjuniordev and Travis Bell,

Thank you so much for your help. Concurrently, I ran the Broken Link Checker Tool, which gave me "400 Bad Request" for a bunch of tmdb URLs. When I followed the URLs, I got "Image size not supported". That error message helped me find this discussion thread back from Jan-2018. https://www.themoviedb.org/talk/5a6986550e0a260d6400d6c0

Now I understand that tmdb changed this year to only support certain image sizes. So with both of your responses, I realize that I need to go through all my tmdb links, change them to use w154 in the URL, and stop linking to the full size poster.

Or, I guess, I could use Fred's plugin. It looks like a good alternative.

Not to worry on your end guys, cuz hardly anyone goes to my website anyway... upside_down

Thank you so much for your quick and helpful replies, -mj lee

Не можеш да нађеш филм или серију? Пријави се да додаш.

Глобално

s фокусирај траку за претрагу
p отворите мени профила
esc затворити отворени прозор
? отвори прозор пречице на тастатури

На страницама медија

b вратити се назад (или родитељу кад је то применљиво)
e иди на страницу за уређивање

На страницама ТВ сезона

(стрелица надесно) пређите на следећу сезону
(лева стрелица) иди на претходну сезону

На страницама ТВ епизода

(стрелица надесно) пређите на следећу епизоду
(лева стрелица) иди на претходну епизоду

На свим страницама са сликама

a отвори прозор за додавање слике

На свим страницама за уређивање

t отвори селектор превода
ctrl+ s пошаљи образац

На страницама за дискусију

n отвори нову дискусију
w мења статус гледања
p мења јавно/приватно
c мења отвори/затвори
a отвори активност
r одговор на дискусију
l иди на последњи одговор
ctrl+ enter пошаљи поруку
(стрелица надесно) следећа страница
(лева стрелица) претходна страница

Подешавања

Желите ли да оцените или додате ову ставку у листу?

Пријави се