Axuda de The Movie Database

Right now I have some images being served up from TheMovieDB API, like posters/backdrops, but some of them are really slow to load for our users. I was wondering if it's okay to proxy them through our server, set cache headers both browser and reverse, so that they'll load faster?

Only thing I'm concerned about is whether or not it's a violation of TOS and if anyone cares. Not trying to steal them or anything, just want to have better control over the cache.

5 respostas (na páxina 1 de 1)

Jump to last post

Hi @mattkenefick,

Images are usually only going to be slow if they are images that haven't been requested before (therefore already in our cache), what image types and sizes are you requesting?

Once the item has been created in our cache, it will be as fast as it possibly can be (based on your proximity to an edge). As long as you are using sizes that are returned in the configuration method, everything should be fast and cached by now.

We use Cloudflare (on an enterprise contract) which at this point is one of the best CDN's in the world so it's really going to be as good as pretty much everything out there.

Having said all that, ya, you're free to have a local cache.

Okay.

I was using posters w300_and_h450_bestv2, but they're also intermingled with another service's posters. Maybe it's the other service that's a bit sluggish and I should ask this question over there.

Thanks for the details though. Good to know what's serving it up.

Ya, so w300_and_h450_bestv2 is not a supported size on the API so you are likely one of the only ones creating those assets. As such, if every item is being generated for the first time, it's going to be slow. There's no way around it.

If I were looking for the standard portrait size, what type should I be looking for?

My other posters are 400x570. I see there's a w400 here on tmdb. Is there a better matching size for me, something more popular, or am I best off using "w400" ?

Everything returned by the configuration method should have a fairly high cache hit ratio.

What images type is this for? Person profiles? If it's person images, w300_and_h450_bestv2 shouldn't actually be too bad since that is the same size I use here on the website. But keep in mind, I only load the first (highest rated) image at that size. That means that every other image has never been cached at that size before.

Non podes atopar unha película ou serie? Inicia sesión para creala.

Global

s amosar a barra de procura
p abrir menú do perfil
esc pechar e abrir xanela
? abrir xanela de atallos do teclado

En páxinas de medios

b atrás (ou á principal se aplica)
e ir a editar páxina

En páxinas de tempadas de televisión

(flecha dereita) ir á tempada seguinte
(flecha esquerda) ir á tempada anterior

En páxinas de episodios de televisión

(flecha dereita) ir ao episodio seguinte
(flecha esquerda) ir ao episodio anterior

En todas as páxinas de imaxe

a abrir a xanela de engadir imaxe

En todas as páxinas de edición

t abrir selector de traducións
ctrl+ s enviar formulario

Nas páxinas de debate

n crear un novo debate
w amosar o estado do seguimento
p mudar público/privado
c mudar abrir/pechar
a abrir actividade
r responder no debate
l ir á última resposta
ctrl+ enter eviar a túa mensaxe
(flecha dereita) páxina seguinte
(flecha esquerda) ir á páxina anterior

Configuración

Queres valorar ou engadir o elemento a unha listaxe?

Iniciar sesión