Files
danbooru/script/fixes/068_regenerate_transparent_backgrounds.rb
evazion 62d183ddf4 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.
2021-01-04 21:43:27 -06:00

8 lines
200 B
Ruby
Executable File

#!/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