diff --git a/app/components/chat_message/chat_message.html.erb b/app/components/chat_message/chat_message.html.erb
index d6771a947..e8e938daa 100644
--- a/app/components/chat_message/chat_message.html.erb
+++ b/app/components/chat_message/chat_message.html.erb
@@ -59,34 +59,36 @@
<% end %>
<% end %>
- <% if image? %>
- <% if message.text.blank? %>
+ <% unless files.empty? %>
+ <% if image? %>
+ <% if message.text.blank? %>
+
+ <% else %>
+ <%= c 'chat_message_photos', photos: image_files %>
+ <% end %>
+ <% end %>
+
+ <% if audio? %>
- <% else %>
- <%= c 'chat_message_photos', photos: files %>
<% end %>
- <% end %>
-
- <% if audio? %>
-
- <% end %>
- <% if video? %>
- <%= c 'chat_message_video', videos: files %>
+ <% if video? %>
+ <%= c 'chat_message_video', videos: video_files %>
+ <% end %>
<% end %>