How to process image links

How do we process image links to set the width and height of the image with the correct aspect ratio?{width}x{height}.jpg

You can set it to whatever you want.

uses 1:1 1/3

Yes, but how do I know what the aspect ratio is? Do I have to hardcode this? Different image links have different ratios too. For game images they are portrait but for stream images they are landscape.

This part of the new API doesn’t seem well thought out.

The aspect ratio is width:height 1:1.3

113/83 = 1.36

To math for stream previews just do the same. Divide what twitch users

Ok, what is it for stream images?{width}x{height}.jpg

Is this information documented somewhere or is this left up to self-discovery?


440/248 = 1.77

Self Disco.

I misread your post and give game art information.

But 1920x1080 will work for stream thumbs. Since thats what people stream at

ratio 1.7777777*

Ok, this should have more documentation or at least another field in the response to let you know how to do the calculation for the image link.

It could also give you the width and height of the source image. You can get it like this without providing a width or height.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.