From de73dea75bcc62cc55f1a7888fce89053a4e69c1 Mon Sep 17 00:00:00 2001 From: Robbe Van Petegem Date: Sat, 10 Aug 2024 10:07:21 +0200 Subject: [PATCH] Use `resize_to_cover` instead of `resize_to_fit` (#618) --- app/serializers/album_serializer.rb | 6 +++--- app/serializers/artist_serializer.rb | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/serializers/album_serializer.rb b/app/serializers/album_serializer.rb index d931ea23..edc9768e 100644 --- a/app/serializers/album_serializer.rb +++ b/app/serializers/album_serializer.rb @@ -32,21 +32,21 @@ def image100 return nil if object.image.blank? return nil unless object.image.image.variable? - rails_representation_url(object.image.image.variant(resize_to_limit: [100, 100]), **scope) + rails_representation_url(object.image.image.variant(resize_to_cover: [100, 100]), **scope) end def image250 return nil if object.image.blank? return nil unless object.image.image.variable? - rails_representation_url(object.image.image.variant(resize_to_limit: [250, 250]), **scope) + rails_representation_url(object.image.image.variant(resize_to_cover: [250, 250]), **scope) end def image500 return nil if object.image.blank? return nil unless object.image.image.variable? - rails_representation_url(object.image.image.variant(resize_to_limit: [500, 500]), **scope) + rails_representation_url(object.image.image.variant(resize_to_cover: [500, 500]), **scope) end def image_type diff --git a/app/serializers/artist_serializer.rb b/app/serializers/artist_serializer.rb index 785bb736..16fd83e2 100644 --- a/app/serializers/artist_serializer.rb +++ b/app/serializers/artist_serializer.rb @@ -26,21 +26,21 @@ def image100 return nil if object.image.blank? return nil unless object.image.image.variable? - rails_representation_url(object.image.image.variant(resize_to_limit: [100, 100]), **scope) + rails_representation_url(object.image.image.variant(resize_to_cover: [100, 100]), **scope) end def image250 return nil if object.image.blank? return nil unless object.image.image.variable? - rails_representation_url(object.image.image.variant(resize_to_limit: [250, 250]), **scope) + rails_representation_url(object.image.image.variant(resize_to_cover: [250, 250]), **scope) end def image500 return nil if object.image.blank? return nil unless object.image.image.variable? - rails_representation_url(object.image.image.variant(resize_to_limit: [500, 500]), **scope) + rails_representation_url(object.image.image.variant(resize_to_cover: [500, 500]), **scope) end def image_type