Avatar
An image with fallback for representing a user.
<%= ui.avatar "https://avatars.githubusercontent.com/u/53885212?v=4", alt: '' %>
Installation
rails g lycan_ui:add avatar
Features
-
Lazy loading of avatars with specified fallback
-
Gracefully falls back if image loading fails
Usage
Using the optional fallback
Pass in fallback
to ui.avatar
with the value of the fallback.
<%= ui.avatar "https://avatars.githubusercontent.com/u/53885212?v=4", fallback: 'LY', alt: '' %>