Skip to content

Instantly share code, notes, and snippets.

@leonidkuznetsov18
Created December 18, 2022 12:05
Show Gist options
  • Save leonidkuznetsov18/70a3f30f90d2ad55f300fedeaf472773 to your computer and use it in GitHub Desktop.
Save leonidkuznetsov18/70a3f30f90d2ad55f300fedeaf472773 to your computer and use it in GitHub Desktop.
Get image size type
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