The Movie Database Support

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 replies (on page 1 of 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.

Can't find a movie or TV show? Login to create it.

Global

s focus the search bar
p open profile menu
esc close an open window
? open keyboard shortcut window

On media pages

b go back (or to parent when applicable)
e go to edit page

On TV season pages

(right arrow) go to next season
(left arrow) go to previous season

On TV episode pages

(right arrow) go to next episode
(left arrow) go to previous episode

On all image pages

a open add image window

On all edit pages

t open translation selector
ctrl+ s submit form

On discussion pages

n create new discussion
w toggle watching status
p toggle public/private
c toggle close/open
a open activity
r reply to discussion
l go to last reply
ctrl+ enter submit your message
(right arrow) next page
(left arrow) previous page

Settings

Want to rate or add this item to a list?

Login