DEV: Remove gifsicle dependency #10357
Conversation
This pull request has been mentioned on Discourse Meta. There might be relevant details there: https://meta.discourse.org/t/uploaded-animated-gifs-of-4mb-or-larger-appear-very-small/147107/25 |
We should add a PSA to the announcements when we merge this. |
This is ready now. FastImage v2.2.0 contains my additions to the gem. |
LGTM Should definitely come with a PSA on meta as well |
0f710e9
to
d71da47
This commit simplifies the logic for rebaking animated GIF images and moves it to a scheduled job (it was a once-off job before). The reason for this change is to split the load of downloading and parsing every GIF images over a longer time period. Also, it no longer recreates uploads as a simple recreation of the optimized images is enough (these are generally used).
|
||
def execute(args) | ||
Upload | ||
.where("original_filename LIKE '%.gif'") |
SamSaffron
Oct 15, 2020
•
Member
Should we use .where("extension = 'gif' or (extension is null AND original_filename like '%.gif' "))
... gifs can sneak in with the wrong filename we rely on actual content I think.
RailsMultisite::ConnectionManagement.each_connection do |db| | ||
puts "Backfilling #{db}..." | ||
Upload | ||
.where('original_filename LIKE \'%.gif\'') |
SamSaffron
Oct 15, 2020
Member
I recommend just instantiating the schedule here. no need to duplicate this code.
nbianca
Oct 15, 2020
•
Author
Member
I removed the backfilling Rake task completely. We do not need one now to force the process and we already have the scheduled job anyway.
hmmm if we are not using "animated" anywhere why bother backfilling now? I think once we actually use this column it makes sense to have a back filler ... but, is there any point doing this early? |
No description provided.