It was a problem because during this operation only the first frame is kept. This commit removes the alternative solution to check if a GIF image is animated.
DB.after_commit