origWidth
← All Butter documentationButter will compress images and videos in Studio to help with bandwidth and performance. This means that although the aspect ratio will always be the same, the width and height of an asset might change between Studio and in export. The width property of an asset will always correspond to the actual size loaded.
If you want to reliably get the size of the original asset, e.g. to scale images relative to their original pixel size, you can use the origWidth property of the asset instead.
Warning: because the actual size of the loaded image may be different, use width for your math if you are indexing into the pixels array!