fix: disable elFinder thumbnails to prevent full-size image loads
- Set tmb: False on all file entries so elFinder never requests thumbnails (previously it would load the full file to generate them) - Set loadTmbs: 0 in elFinder config - Folders with lots of images should now open instantly
This commit is contained in:
1 parent
29f3cd1910
commit
48f844f5ea
2 files changed
+8
No files matched your search
@@ -871,6 +871,7 @@ def _elf_entry(proto, host, port, share, path, name, is_dir, size=0, mime=None):
|
||||
"dirs": 1 if is_dir else 0,
|
||||
"read": 1, "write": 1, "locked": 0, "hidden": 0,
|
||||
"ts": 0,
|
||||
"tmb": False, # disable thumbnail generation — avoids loading full-size files
|
||||
"volumeid": f"{proto}_{host}_{port}_{share}_",
|
||||
}
|
||||
if phash:
|
||||
|
||||
@@ -1019,6 +1019,13 @@ function elfShowCreds(container, taskId, elfState) {
|
||||
rememberLastDir: false,
|
||||
soundPath: '/static/elfinder/sounds/',
|
||||
lang: 'en',
|
||||
// Disable thumbnail loading — we don't resize images server-side
|
||||
loadTmbs: 0,
|
||||
commandsOptions: {
|
||||
quicklook: { autoplay: false },
|
||||
},
|
||||
// Disable commands we can't support
|
||||
commands: ['*'],
|
||||
uiOptions: {
|
||||
toolbar: [['back','forward','up'],['mkdir','upload'],['copy','cut','paste'],['rm'],['info'],['view','sort']],
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user