diff --git a/app/models/concerns/alchemy/picture_thumbnails.rb b/app/models/concerns/alchemy/picture_thumbnails.rb index ef3a234e81..cffc857407 100644 --- a/app/models/concerns/alchemy/picture_thumbnails.rb +++ b/app/models/concerns/alchemy/picture_thumbnails.rb @@ -84,7 +84,7 @@ def thumbnail_url_options crop_from: crop && crop_from.presence || default_crop_from&.join("x"), crop_size: crop && crop_size.presence || default_crop_size&.join("x"), flatten: true, - format: picture&.image_file_format || "jpg" + format: "webp" } end diff --git a/app/views/alchemy/admin/pictures/_picture.html.erb b/app/views/alchemy/admin/pictures/_picture.html.erb index 474f302453..7a1abac4c1 100644 --- a/app/views/alchemy/admin/pictures/_picture.html.erb +++ b/app/views/alchemy/admin/pictures/_picture.html.erb @@ -20,7 +20,7 @@ <% end %> - <% picture_url = picture.url(size: preview_size(@size), flatten: true) %> + <% picture_url = picture.url(size: preview_size(@size), flatten: true, format: "webp") %> <% image = image_tag(picture_url || "alchemy/missing-image.svg", alt: picture.name) %> <% if can?(:edit, picture) && picture_url %> <%= link_to( diff --git a/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb b/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb index 2ccdaaf993..0443754ec8 100644 --- a/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +++ b/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb @@ -2,7 +2,7 @@ <%= link_to( image_tag( - picture_to_assign.url(size: preview_size(size), flatten: true) || "alchemy/missing-image.svg", + picture_to_assign.url(size: preview_size(size), flatten: true, format: "webp") || "alchemy/missing-image.svg", alt: picture_to_assign.name ), alchemy.assign_admin_picture_path(