Mark webp and avif files as images.
Some checks failed
rust-test Build rust-test has failed
clippy Build clippy has failed
format Build format has succeeded
build Build build has succeeded

This commit is contained in:
Tom Alexander
2026-11-01 14:05:13 -05:00
parent 1c369e4b25
commit 39d838a284

View File

@@ -74,7 +74,9 @@ impl LinkTarget {
// If link type is file and the path ends in .svg then make it an image target
if let LinkType::File = link_type
&& (input.to_ascii_lowercase().ends_with(".svg")
|| input.to_ascii_lowercase().ends_with(".png"))
|| input.to_ascii_lowercase().ends_with(".png")
|| input.to_ascii_lowercase().ends_with(".avif")
|| input.to_ascii_lowercase().ends_with(".webp"))
{
let src = Self::get_image_src(&input)?;
let alt = Self::get_image_alt(&input)?;