Skip to content

Commit 4b41a2a

Browse files
committed
Improve optimized profile image for communities
1 parent 30cfe30 commit 4b41a2a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/models/better_together/community.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ def optimized_profile_image
7676
else
7777
# For other formats, analyze to determine transparency
7878
metadata = profile_image.metadata
79-
if profile_image.content_type == 'image/png' && metadata[:alpha]
79+
if profile_image.content_type == 'image/png'
8080
# If PNG with transparency, return the optimized PNG variant
81-
profile_image.variant(:optimized_png)
81+
profile_image.variant(:optimized_png).processed
8282
else
8383
# Otherwise, use the optimized JPG variant
84-
profile_image.variant(:optimized_jpeg)
84+
profile_image.variant(:optimized_jpeg).processed
8585
end
8686
end
8787
end

0 commit comments

Comments
 (0)