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:
parent
b489af74bd
commit
a44ac3663c
1 changed files with 1 additions and 3 deletions
|
@ -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)?
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue