diff --git a/src/post_process/mod.rs b/src/post_process/mod.rs index ea9bfdc..5314b53 100644 --- a/src/post_process/mod.rs +++ b/src/post_process/mod.rs @@ -198,6 +198,22 @@ where match rs.sniffed_mime { Some(mime) if config.normalization > NormalizationPolicy::Never => { if mime.starts_with("image/") { + if mime.starts_with("image/gif") { + return Ok(MediaResponse::PassThru(PassThru { + header_len: header + .position() + .try_into() + .map_err(|_| ErrorResponse::payload_too_large())?, + header: Box::new(header.into_inner()), + remaining_body, + content_type: Some(mime.to_string()), + is_https, + }) + .with_timing_info(TIME_TO_FIRST_BYTE_KEY, ttfb) + .with_opt_timing_info(SLURP_TIMING_KEY, None) + .with_timing_info(TIMING_KEY, begin.elapsed())); + } + if config.normalization <= NormalizationPolicy::Opportunistic && !options.requested_resize() && (config.normalization <= NormalizationPolicy::Lazy