Skip to content

Commit

Permalink
Adapt to the .webp images in advance
Browse files Browse the repository at this point in the history
提前适配webp格式图片
  • Loading branch information
jiangtian616 committed Oct 20, 2024
1 parent 975c7e6 commit a4fe575
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions changelog/v8.0.4+263.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
- 提前适配webp格式图片

--------------------

- Adapt to the .webp images in advance
3 changes: 2 additions & 1 deletion lib/src/utils/file_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ class FileUtil {
static final RegExp _archivePathPattern = RegExp(r'Archive - \d+ - .*');

static bool isImageExtension(String path) {
return path.endsWith('.jpg') || path.endsWith('.JPG') || path.endsWith('.png') || path.endsWith('.gif') || path.endsWith('.jpeg');
String s = path.toLowerCase();
return s.endsWith('.jpg') || s.endsWith('.png') || s.endsWith('.gif') || s.endsWith('.jpeg') || s.endsWith('.webp');
}

static bool isJHenTaiGalleryDirectory(Directory directory) {
Expand Down

0 comments on commit a4fe575

Please sign in to comment.