Fixed image sizing bug in avatar component #407
Merged
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
I found a small bug in FwbAvatar component. If the image is not square, then there it is displayed improperly.

Here is the example:
Avatar has width 150 and height 120 pixels
By default img tag has
object-fit: fill
, so that's why images are displayed this way.I added

object-cover
class for img tag in avatar component. And here is the same avatar with my fix:P.S. Is there any chance to get a new release of the library in npm? There were a number of fixes in main branch, but the latest version 0.2.1 was released in April 2025.
Summary by CodeRabbit