Yes, it looks like a straight forward fix. I will change the current functionality.
Anyway, it looks like we’re resizing the GIF images for the last 5 years using “gifsicle” and we didn’t receive any performance issue on it. @zogstrip may know more details.
https://github.com/discourse/discourse/commit/d456460d33859a3f6890062083ace6f64aa17266