mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 15:48:43 -05:00
Merge pull request #1328 from abbat/patch-1
Generate avatars with transparent background
This commit is contained in:
commit
693bd7d7db
1 changed files with 1 additions and 1 deletions
|
@ -22,7 +22,7 @@ module Jobs
|
|||
temp_file = Tempfile.new(["discourse-avatar", File.extname(original_path)])
|
||||
temp_path = temp_file.path
|
||||
#
|
||||
Discourse.store.store_avatar(temp_file, upload, size) if ImageSorcery.new(original_path).convert(temp_path, gravity: "center", thumbnail: "#{size}x#{size}^", extent: "#{size}x#{size}")
|
||||
Discourse.store.store_avatar(temp_file, upload, size) if ImageSorcery.new(original_path).convert(temp_path, gravity: "center", thumbnail: "#{size}x#{size}^", extent: "#{size}x#{size}", background: "transparent")
|
||||
# close && remove temp file
|
||||
temp_file.close!
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue