Skip to content
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

Crops non 1:1 officer images to prevent stretching #727

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

smalex-z
Copy link
Contributor

@smalex-z smalex-z commented Oct 30, 2024

Describe your changes

Non-square officer images get shrunk to fit to a 1:1 aspect ratio. This fixes that issue (for the /officers page, /dev renders the full photo).

"objectFit="cover" // Crop to fit the aspect ratio" added to the OfficerCard component

Before:
image
After:
image

Issue ticket number and link

N/A

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • Do we need to implement analytics?
  • Will this be part of a product update? If yes, please write one phrase about this update.

Copy link
Contributor

@snigdha-kansal snigdha-kansal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a great fix, thanks for doing this! 🔥💯

@smalex-z smalex-z merged commit 7d58f47 into main Oct 31, 2024
8 checks passed
@smalex-z smalex-z deleted the officer-image-cover branch October 31, 2024 07:11
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

Successfully merging this pull request may close these issues.

2 participants