Skip to content

Please add ->isPortrait property to Pageimage objects #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
BernhardBaumrock opened this issue Mar 31, 2025 · 1 comment
Open

Please add ->isPortrait property to Pageimage objects #561

BernhardBaumrock opened this issue Mar 31, 2025 · 1 comment

Comments

@BernhardBaumrock
Copy link

Often in designs we have to treat images differently if they are higher than wide. Code like this bloats templates and needs more cognitive power to understand:

if($img->height > $img->width) {
   ...
}

It would be great to have an "isPortrait" property:

if($img->isPortrait) {
   ...
}
@gideonso
Copy link

gideonso commented Apr 1, 2025

This one will be very handy if added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants