Skip to content

[BUG] Local Driver 生成 HEIC 预览缩略图失败,日志报:image: unknown format #3121

Description

@pcleon

请确认以下事项

  • 我已确认阅读并同意 AGPL-3.0 第15条 。
    本程序不提供任何明示或暗示的担保,使用风险由您自行承担。

  • 我已确认阅读并同意 AGPL-3.0 第16条 。
    无论何种情况,版权持有人或其他分发者均不对使用本程序所造成的任何损失承担责任。

  • 我确认我的描述清晰,语法礼貌,能帮助开发者快速定位问题,并符合社区规则。

  • 我已确认阅读了OpenList文档。

  • 我已确认没有重复的问题或讨论。

  • 我已确认是OpenList的问题,而不是其他原因(例如 网络 ,依赖或操作)。

  • 我认为此问题必须由OpenList处理,而非第三方。

  • 我已确认这个问题在最新版本中没有被修复。

  • 我没有阅读这个清单,只是闭眼选中了所有的复选框,请关闭这个 Issue 。

OpenList 版本(必填)

v4.2.6

使用的存储驱动(必填)

本机存储

问题描述(必填)

使用 OpenList v4.2.6 的本地存储驱动时,目录列表中的 HEIC 图片无法生成缩略图。

同一个 HEIC 文件点击后可以正常查看原图,因此文件本身可以正常读取,浏览器也可以正常显示 HEIC。

目前只有目录列表中的缩略图生成失败。

例如目录中存在:

IMG_20260630_203428.heic
IMG_20260630_203429.heic

打开该目录后:

JPG/PNG 图片可以正常显示缩略图
HEIC 图片没有缩略图
点击 HEIC 文件后可以正常查看原图
OpenList 后端日志出现 image: unknown format

Image

日志(必填)

[GIN] 2026/09/23 - 13:38:31 | 500 | 527.715µs | 2408:8409:ce0:49c0:6103:f9a:3ecd:25e | GET "/d/相机/小米手机/2026/20260624_210631_001.heic?type=thumb&sign=-WfxbjZnbMMvUsOME6TeaC0QntLX3tKC-NxZ0rio-mw=:0"
ERRO[2026-09-23 13:38:31] failed link /相机/小米手机/2026/20260624_203913_001.heic: image: unknown format
failed get link
github.com/OpenListTeam/OpenList/v4/internal/op.Link.func1
/source/internal/op/fs.go:262
github.com/OpenListTeam/OpenList/v4/pkg/singleflight.(*Group[...]).doCall.func2
/source/pkg/singleflight/singleflight.go:198
github.com/OpenListTeam/OpenList/v4/pkg/singleflight.(*Group[...]).doCall
/source/pkg/singleflight/singleflight.go:200
github.com/OpenListTeam/OpenList/v4/pkg/singleflight.(*Group[...]).Do
/source/pkg/singleflight/singleflight.go:113
github.com/OpenListTeam/OpenList/v4/internal/op.Link
/source/internal/op/fs.go:273
github.com/OpenListTeam/OpenList/v4/internal/fs.link
/source/internal/fs/link.go:18
github.com/OpenListTeam/OpenList/v4/internal/fs.Link
/source/internal/fs/fs.go:55
github.com/OpenListTeam/OpenList/v4/server/handles.Proxy
/source/server/handles/down.go:61
github.com/OpenListTeam/OpenList/v4/server/handles.Down
/source/server/handles/down.go:29
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/context.go:192
github.com/OpenListTeam/OpenList/v4/server.Init.DownloadRateLimiter.func7
/source/server/middlewares/limit.go:51
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/context.go:192
github.com/OpenListTeam/OpenList/v4/server.Init.Down.func8
/source/server/middlewares/down.go:43
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/context.go:192
github.com/OpenListTeam/OpenList/v4/server/middlewares.PathParse
/source/server/middlewares/down.go:21
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/context.go:192
github.com/OpenListTeam/OpenList/v4/server/middlewares.StoragesLoaded
/source/server/middlewares/check.go:35
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/context.go:192
github.com/gin-gonic/gin.CustomRecoveryWithWriter.func1
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/recovery.go:90
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/context.go:192
github.com/gin-gonic/gin.LoggerWithConfig.func1
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/logger.go:282
github.com/gin-gonic/gin.(*Context).Next
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/context.go:192
github.com/gin-gonic/gin.(*Engine).handleHTTPRequest
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/gin.go:722
github.com/gin-gonic/gin.(*Engine).ServeHTTP
/go/pkg/mod/github.com/gin-gonic/gin@v1.12.0/gin.go:672
net/http.serverHandler.ServeHTTP
/usr/local/go/src/net/http/server.go:3309
net/http.(*conn).serve
/usr/local/go/src/net/http/server.go:2067
runtime.goexit
/usr/local/go/src/runtime/asm_amd64.s:1771
failed link
[GIN] 2026/09/23 - 13:38:31 | 500 | 513.896µs | 2408:8409:ce0:49c0:6103:f9a:3ecd:25e | GET "/d/相机/小米手机/2026/20260624_203913_001.heic?type=thumb&sign=CFPJ0JIqmUChQ4ZzELLCltRKVJe6WUXpiz0VxXs9jRQ=:0"

配置文件内容(必填)

{
"force": false,
"site_url": "/",
"cdn": "",
"jwt_secret": "xxx",
"token_expires_in": 48,
"database": {
"type": "sqlite3",
"host": "",
"port": 0,
"user": "",
"password": "",
"name": "",
"db_file": "/data2/service/openlist/data/data.db",
"table_prefix": "x_",
"ssl_mode": "",
"dsn": ""
},
"meilisearch": {
"host": "http://localhost:7700",
"api_key": "",
"index": "openlist"
},
"scheme": {
"address": "0.0.0.0",
"http_port": 7000,
"https_port": -1,
"force_https": false,
"cert_file": "",
"key_file": "",
"unix_file": "",
"unix_file_perm": "",
"enable_h2c": false,
"enable_h3": false
},
"temp_dir": "/data2/service/openlist/data/temp",
"bleve_dir": "/data2/service/openlist/data/bleve",
"dist_dir": "",
"log": {
"enable": true,
"name": "/data2/service/openlist/data/log/log.log",
"max_size": 10,
"max_backups": 5,
"max_age": 28,
"compress": false,
"filter": {
"enable": false,
"filters": [
{
"cidr": "",
"path": "/ping",
"method": ""
},
{
"cidr": "",
"path": "",
"method": "HEAD"
},
{
"cidr": "",
"path": "/dav/",
"method": "PROPFIND"
}
]
}
},
"delayed_start": 0,
"auto_memory_limit": 4,
"min_free_memory": 0,
"max_block_limit": 0,
"max_connections": 0,
"max_concurrency": 64,
"tls_insecure_skip_verify": false,
"tasks": {
"download": {
"workers": 5,
"max_retry": 1,
"task_persistant": false
},
"transfer": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"upload": {
"workers": 5,
"max_retry": 0,
"task_persistant": false
},
"copy": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"move": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"decompress": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"decompress_upload": {
"workers": 5,
"max_retry": 2,
"task_persistant": false
},
"allow_retry_canceled": false
},
"cors": {
"allow_origins": [
""
],
"allow_methods": [
"
"
],
"allow_headers": [
"*"
]
},
"s3": {
"enable": false,
"port": 5246,
"ssl": false
},
"ftp": {
"enable": false,
"listen": ":5221",
"find_pasv_port_attempts": 50,
"active_transfer_port_non_20": false,
"idle_timeout": 900,
"connection_timeout": 30,
"disable_active_mode": false,
"default_transfer_binary": false,
"enable_active_conn_ip_check": true,
"enable_pasv_conn_ip_check": true
},
"sftp": {
"enable": false,
"listen": ":5222"
},
"mcp": {
"enable": false
},
"last_launched_version": "v4.2.2",
"proxy_address": ""
}

复现链接(可选)

使用 OpenList v4.2.6。
创建/使用本地存储驱动。
在本地存储中放置一张由小米手机拍摄的 .heic 图片。
打开包含该 HEIC 图片的目录。
观察目录列表中的缩略图。
HEIC 文件没有缩略图,同时后端出现 image: unknown format。
点击该 HEIC 文件,原图可以正常显示。

AI生成内容

  • 我使用了AI工具生成此内容
  • 我没有使用AI工具生成此内容

AI模型是

chatgpt

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions