We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30cfe30 commit 4b41a2aCopy full SHA for 4b41a2a
app/models/better_together/community.rb
@@ -76,12 +76,12 @@ def optimized_profile_image
76
else
77
# For other formats, analyze to determine transparency
78
metadata = profile_image.metadata
79
- if profile_image.content_type == 'image/png' && metadata[:alpha]
+ if profile_image.content_type == 'image/png'
80
# If PNG with transparency, return the optimized PNG variant
81
- profile_image.variant(:optimized_png)
+ profile_image.variant(:optimized_png).processed
82
83
# Otherwise, use the optimized JPG variant
84
- profile_image.variant(:optimized_jpeg)
+ profile_image.variant(:optimized_jpeg).processed
85
end
86
87
0 commit comments