diff --git a/app/helpers/gallery_helper.rb b/app/helpers/gallery_helper.rb index 98f7ffc1e..1f9ddeeab 100644 --- a/app/helpers/gallery_helper.rb +++ b/app/helpers/gallery_helper.rb @@ -9,19 +9,19 @@ module GalleryHelper def preview_url_for(attachment) attachment.preview(resize_to_limit: [400, 400]).processed.url - rescue ActiveStorage::Error + rescue StandardError 'pdf-placeholder.png' end def variant_url_for(attachment) attachment.variant(resize_to_limit: [400, 400]).processed.url - rescue ActiveStorage::Error + rescue StandardError 'apercu-indisponible.png' end def blob_url(attachment) attachment.blob.content_type.in?(RARE_IMAGE_TYPES) ? attachment.variant(resize_to_limit: [2000, 2000]).processed.url : attachment.blob.url - rescue ActiveStorage::Error + rescue StandardError attachment.blob.url end end