Closed CptPie closed 3 years ago
We could probably DL the larger poster and resize it locally. Save the original then put the resizing in a go routine so it doesn't hang the client.
I'll change the download part of this issue tomorrow - do you have any idea how to resize the images locally with golang? From what i have seen we would have to use an external library for that (and the one i found was last updated 2018)
After some more research and testing i think that https://github.com/nfnt/resize might be a good choice.
I ran a local test with an original file size of 75.0kb (1500x2250 px) resized to 10.6kb (300x450 px) using the same code as in the readme of the project.
Yea, I'm ok with that.
As a note, images should be resized to 300px high, keeping the aspect ratio.
This was first encountered when adding Baby Driver (2017) and is caused by the
w300
size specification in the request url. In this specific case the poster is not available in this resolution (because of reasons). To fix that we could use theoriginal
poster definition although that might increase file size.Your opinion @zorchenhimer ?