1
0
Fork 0
mirror of https://gitlab.com/news-flash/article_scraper.git synced 2025-07-07 16:15:32 +02:00

don't resize animated images

This commit is contained in:
Jan Lukas Gernert 2019-09-24 14:25:57 +02:00
parent b489af74bd
commit a44ac3663c

View file

@ -107,7 +107,7 @@ impl ImageDownloader {
big_image = Some(big_buffer);
}
if content_type_small != "image/svg+xml" {
if content_type_small != "image/svg+xml" && content_type_small != "image/gif" {
let (original_image, resized_image) = Self::scale_image(&small_image, self.max_size)?;
if let Some(resized_image) = resized_image {
small_image = resized_image;
@ -236,6 +236,4 @@ impl ImageDownloader {
}
Err(ImageDownloadErrorKind::ContentLenght)?
}
}