Add support for PNGs.
This commit is contained in:
parent
7c17087920
commit
88064409a6
@ -73,7 +73,8 @@ impl LinkTarget {
|
||||
) -> Result<LinkTarget, CustomError> {
|
||||
// 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(".svg")
|
||||
|| input.to_ascii_lowercase().ends_with(".png"))
|
||||
{
|
||||
let src = Self::get_image_src(&input)?;
|
||||
let alt = Self::get_image_alt(&input)?;
|
||||
|
Loading…
x
Reference in New Issue
Block a user