Avatar field ratio on details #4930
-
Description:The Avatar field when using But it is round on Forms with a static 1:1 ratio. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 6 replies
-
Beta Was this translation helpful? Give feedback.
-
|
Same issue when using |
Beta Was this translation helpful? Give feedback.
-
|
Same here! Seem to happened from 4.15 version |
Beta Was this translation helpful? Give feedback.
-
|
Why was this concerted to a discussion ? It's clearly a regression @crynobone |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Made some tweaks to the use Laravel\Nova\Fields\Image;
Image::make('Image')
->indexWidth(70)
->detailWidth(300)
->rounded()
->aspect(Image::ASPECT_SQUARE)The options available are:
I've also added |
Beta Was this translation helpful? Give feedback.
-
|
@davidhemphill thanks for this update! It could be great to define aspect on both view like width: To reproduce it, set an avatar with a ratio 3:2 or 3:1 ASPECT_VIDEO seems to be not present on 4.18.0 release, only ASPECT_SQUARE and ASPECT_AUTO |
Beta Was this translation helpful? Give feedback.






Made some tweaks to the
AvatarandImagefields. In the next version, anaspectmethod will allow you to set the image's aspect ratio. Nova will not assume the aspect ratio by default, meaning yourAvatarfields will not be presumed to be square.The options available are:
I've also added
indexWidthanddetailWidthmethods to allow you to specify separate sizes for each view. It's important to note,maxWidthwill override both of those for compatibility purposes, but is nownullby default.