1
0
mirror of git://jb55.com/damus synced 2024-09-19 19:46:51 +00:00

Add webp image support

Kingfisher already supports this... wtf we doing

Changelog-Added: Add webp image support
This commit is contained in:
William Casarin 2023-05-03 17:27:19 -07:00
parent 5c557bc87d
commit add1e6104e

View File

@ -380,7 +380,7 @@ func render_blocks(blocks: [Block], profiles: Profiles, privkey: String?) -> Not
func is_image_url(_ url: URL) -> Bool { func is_image_url(_ url: URL) -> Bool {
let str = url.lastPathComponent.lowercased() let str = url.lastPathComponent.lowercased()
let isUrl = str.hasSuffix(".png") || str.hasSuffix(".jpg") || str.hasSuffix(".jpeg") || str.hasSuffix(".gif") let isUrl = str.hasSuffix(".png") || str.hasSuffix(".jpg") || str.hasSuffix(".jpeg") || str.hasSuffix(".gif") || str.hasSuffix(".webp")
return isUrl return isUrl
} }