0
0
Fork 0

Fix uploading higher-than-wide GIF profile picture with libvips enabled (#32911)

This commit is contained in:
Claire 2024-11-15 16:35:30 +01:00 committed by GitHub
parent 0838cf1e05
commit f1ef7b5b43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View file

@ -52,6 +52,7 @@ module Paperclip
# implement. If cropping ever becomes necessary for other situations, this will
# need to be expanded.
crop_width = crop_height = [target_width, target_height].min if @target_geometry&.square?
crop_width = crop_height = "'min(iw,ih)'" if crop_width == 'ih'
filter = begin
if @crop