Problem/Motivation
User picture should not be an "hero/wide" image because it is no more aligned

Steps to reproduce
Display the profil of a user having a defined picture (or a default one)
Proposed resolution
Adapt olivero_preprocess_field as follow:
function olivero_preprocess_field(&$variables) {
...
if (
$variables['field_type'] == 'image' &&
$variables['element']['#view_mode'] == 'full' &&
!$variables["element"]["#is_multiple"] &&
$variables['field_name'] !== 'user_picture' // Here is the change
) {
$variables['attributes']['class'][] = 'wide-image';
}
}Remaining tasks
Create a patch
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 3256433-before-after.png | 56.28 KB | awset |
| #6 | 3256433-after_patch.png | 72.57 KB | abhijith s |
| #6 | 3256433-before_patch.png | 26.96 KB | abhijith s |
| #3 | Before - After (Olivero).png | 111 KB | andregp |
| #3 | 3256433-3.patch | 720 bytes | andregp |
Comments
Comment #2
andregp commentedOkay, I'll do it =)
Comment #3
andregp commentedSending the patch with the proposed change.
Here's an image of before/after the code change:
Comment #5
andregp commentedI think there was a bug on the tests because I repeated the test and it worked on the second time, so I'm sending it back to "needs review".
Comment #6
abhijith s commentedApplied patch #3 on 9.4.x and it works fine.
Before patch:

After patch:

RTBC +1
Comment #7
awset commentedApplied patch #3 on 9.4.x and it works fine.
Tested on:
RTBC +1
Comment #8
awset commentedComment #9
mherchelPatch in #3 looks great to me! Thanks @andregp
Comment #12
lauriiiCommitted 80ba63e and pushed to 10.0.x. Also cherry-picked to 9.4.x. Thanks!