<%= f.label @attribute, class: "block text-sm font-medium leading-6 text-gray-900" %>
<% url = if f.object.send(@attribute).attached? url_for(f.object.send(@attribute)) end %> <%= render(AvatarComponent.new(src: url))%>
<%= f.input_field @attribute, as: :hidden, type: :file, accept: "image/*" %>