Add fix script to regenerate old posts with transparent backgrounds.
Fixes #1862. Very old posts with transparent backgrounds used black instead of white backgrounds in thumbnails. This was changed in #603 (see also #1239), but the thumbnails were never regenerated.
This commit is contained in:
7
script/fixes/068_regenerate_transparent_backgrounds.rb
Executable file
7
script/fixes/068_regenerate_transparent_backgrounds.rb
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env ruby
|
||||
|
||||
require_relative "../../config/environment"
|
||||
|
||||
Post.system_tag_match("transparent_background id:<=1361925").find_each do |post|
|
||||
post.regenerate_later!("resizes", User.system)
|
||||
end
|
||||
Reference in New Issue
Block a user