You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing aspect ratio come back is 56.25 for 16:9 content, which suggests it's calculated by taking the height as a percentage of the width. But aspect ratio is the ratio of width to height, not height to width. I'd expect it to be given either as an exact fraction like "16/9" or "16:9" or [16, 9], or as a decimal number like 1.777778.
I realize changing it would be breaking, but I know most developers will be surprised to see it come back as 100 * height / width, so maybe it's something to consider for a future major release.
Steps to reproduce
Query (I'm using GQL) for an embed, and ask for its aspect ratio
Expected behaviour
Any of
"16/9"
"16:9"
[16, 9]
1.77777778
Embedded Assets version
3.2.0
Craft CMS version
4.5.11.1
The text was updated successfully, but these errors were encountered:
56.25 is what's being returned (e.g. for a YouTube video of size 1920x1080 that I just tested) by the Embed library this plugin uses. If you believe that is incorrect, you'll need to take up the issue with them.
Bug Description
I'm seeing aspect ratio come back is 56.25 for 16:9 content, which suggests it's calculated by taking the height as a percentage of the width. But aspect ratio is the ratio of width to height, not height to width. I'd expect it to be given either as an exact fraction like
"16/9"
or"16:9"
or[16, 9]
, or as a decimal number like1.777778
.I realize changing it would be breaking, but I know most developers will be surprised to see it come back as
100 * height / width
, so maybe it's something to consider for a future major release.Steps to reproduce
Expected behaviour
Any of
"16/9"
"16:9"
[16, 9]
1.77777778
Embedded Assets version
3.2.0
Craft CMS version
4.5.11.1
The text was updated successfully, but these errors were encountered: