v2-hub
v2-hub copied to clipboard
`assets` template tag should define a variable with image ratio
Expected behaviour
When using image assets, I often need the image ratio, for calculating stuff in JS or whatever. I ended up using {{ width | divide:height }} everywhere in my code, but it would be much easier if the assets tag defines a ratio variable containg the pre-calculated value.
Actual behaviour
It doesn't.
Server Details
Operating System: macOS
Web Server: Nginx
PHP Version: 7.2.5
Statamic Version: 2.8.12
Updated from an older Statamic or fresh install: Updated