Skip to content

[icon] Ability to behave like images #3358

@azmeuk

Description

@azmeuk

Feature Request

A situation I often encounter is that I display user avatar, say with ui small circular image and when users have not set their avatar I want to use a placeholder and I set a user icon. Generally I struggle to produce the same rendering for the icon and the image. A huge icon is still generally small compared to a small image.

I generally solve this by adding custom CSS.

Example (if possible)

I would love if icons could somehow behave like image on some given conditions. For instance I would love to be able to do something like this:

<div class="ui small circular image">
{% if user.photo %}
    <img src="{{ user.photo }}" alt="{{ user.name }}">
{% else %}
     <i class="user icon"></i>
{% endif %}
</div>

And then it would produce the same size icon or image.

What do you think?

Metadata

Metadata

Assignees

Labels

type/featAny feature requests or improvements

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions