fallback to smaller media when file too large

This commit is contained in:
2026-08-04 16:22:49 +08:00
parent 6fd4edb3c5
commit 93d47752cf
5 changed files with 257 additions and 42 deletions
+3 -1
View File
@@ -129,7 +129,9 @@ impl Tweet {
title: None,
url: original_twimg_url(&item.media_url_https),
thumbnail_url: None,
fallback_url: None,
// The param-less base URL is a reduced-size variant;
// used as the fallback when the original is too large.
fallback_url: Some(item.media_url_https.clone()),
}),
"video" => media.push(Media::Video {
title: None,