diff --git a/lib/philomena/processors/png.ex b/lib/philomena/processors/png.ex index efcd2c82..90e739ae 100644 --- a/lib/philomena/processors/png.ex +++ b/lib/philomena/processors/png.ex @@ -15,8 +15,13 @@ defmodule Philomena.Processors.Png do } end - def post_process(_analysis, file) do - %{replace_original: optimize(file)} + def post_process(analysis, file) do + if analysis.animated? do + # libpng has trouble with animations, so skip optimization + %{} + else + %{replace_original: optimize(file)} + end end def intensities(_analysis, file) do