TemporaryFile::commit throws instead of returning a bool.
And adopt it all over the code.
FFmpeg plugin serves as a better performant/quality alternative to resize animated GIFs than the ImageMagick plugin.