Created
December 18, 2022 12:05
-
-
Save leonidkuznetsov18/70a3f30f90d2ad55f300fedeaf472773 to your computer and use it in GitHub Desktop.
Get image size type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getImageSizeType(width, height) { | |
if (width > height) { | |
return 'landscape'; | |
} else if (width < height) { | |
return 'portrait'; | |
} else { | |
return 'square'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment