I’m developing a site which may link to a live twitch stream taken from the results of the ‘streams’ api:
I’d like to be able to show a preview of the stream as well.
In the api response, there is a large, small, and medium ‘preview’ image link. Example:
"preview": {
"small": "https://static-cdn.jtvnw.net/previews-ttv/live_user_dansgaming-80x45.jpg",
"medium": "https://static-cdn.jtvnw.net/previews-ttv/live_user_dansgaming-320x180.jpg",
"large": "https://static-cdn.jtvnw.net/previews-ttv/live_user_dansgaming-640x360.jpg",
"template": "https://static-cdn.jtvnw.net/previews-ttv/live_user_dansgaming-{width}x{height}.jpg"
}
My question is should I be hotlinking these images on my site or downloading and redistributing through my own site?
i.e.
Hotlinking:
<img src="https://static-cdn.jtvnw.net/previews-ttv/live_user_dansgaming-320x180.jpg">
vs
Redistributing myself:
<img src="https://myexamplesite.com/twitch-preview/live_user_dansgaming-320x180.jpg">
The same question could also apply to the channel’s logo image as well.
For general web best practices, I would lean towards downloading+redistribute as it’s my site so I should be paying for the bandwidth. The advantage of hotlinking would be the preview image is always up to date and I don’t have to cache the preview myself periodically.
I couldn’t find any guidelines/recommendations on this elsewhere in the documentation.