diff --git a/src/main.rs b/src/main.rs index 03e2434..4667caa 100644 --- a/src/main.rs +++ b/src/main.rs @@ -134,9 +134,9 @@ async fn fetch_twitter_image_link(http: &reqwest::Client, url: &Uri) -> AppResul .headers() .get(http::header::LOCATION) .unwrap() - .to_str()? - .to_owned(); - Ok(link) + .to_str()?; + // use webp format for direct twitter links since webp is cheaper + Ok(format!("{link}?format=webp")) } fn get_conf(name: &str) -> String {