diff --git a/app/views/arts/index.html.erb b/app/views/arts/index.html.erb
index f2fda4f..d1fc094 100644
--- a/app/views/arts/index.html.erb
+++ b/app/views/arts/index.html.erb
@@ -6,8 +6,12 @@
<% if featured_art&.image&.attached? %>
- <%= image_tag featured_art.webp_image.processed,
+ <% begin %>
+ <%= image_tag featured_art.webp_image.processed,
class: "w-full h-full object-cover" %>
+ <% rescue StandardError => e %>
+ <% Rails.logger.error("image load error: #{e.message}") if defined?(Rails) %>
+ <% end %>
<% end %>
@@ -107,8 +111,15 @@
<% if art.image.attached? %>
- <%= image_tag art.preview_image.processed,
+ <% begin %>
+ <%= image_tag art.preview_image.processed,
class: "w-full h-full object-cover transform group-hover:scale-105 transition-transform duration-500" %>
+ <% rescue StandardError => e %>
+
+ <% Rails.logger.error("图片加载失败: #{e.message}") if defined?(Rails) %>
+ <% end %>
diff --git a/app/views/cities/index.html.erb b/app/views/cities/index.html.erb
index 79749b9..7a0f802 100644
--- a/app/views/cities/index.html.erb
+++ b/app/views/cities/index.html.erb
@@ -5,9 +5,13 @@
<% if featured_art&.image&.attached? %>
-
- <%= image_tag featured_art.webp_image.processed,
- class: "w-full h-full object-cover object-center" %>
+ <% begin %>
+
+ <%= image_tag featured_art.webp_image.processed,
+ class: "w-full h-full object-cover object-center" %>
+ <% rescue StandardError => e %>
+ <% Rails.logger.error("image load error: #{e.message}") if defined?(Rails) %>
+ <% end %>
<% end %>