<%# The image preview once user has uploaded a new file %>
<%# The placeholder image for empty avatar field %>
">
<%= lucide_icon "image-plus", class: "w-6 h-6 text-gray-500" %>
<%# The attached image if user has already uploaded one %>
">
<% if user.profile_image.attached? %>
<%= render "settings/user_avatar", user: user %>
<% end %>
<%= form.hidden_field :delete_profile_image, value: "0", data: { profile_image_preview_target: "deleteProfileImage" } %>
<%= t(".accepted_formats") %>
<%= form.label :profile_image, t(".choose"),
class: "btn btn--outline inline-block" %>
<%= form.file_field :profile_image,
accept: "image/png, image/jpeg",
class: "hidden px-3 py-2 bg-gray-50 text-gray-900 rounded-md text-sm font-medium",
data: {
profile_image_preview_target: "input",
action: "change->profile-image-preview#showFileInputPreview"
} %>