Update dispatch.php

Keep the thumbnail original filename.
This commit is contained in:
danpros 2025-10-21 07:51:22 +07:00
commit 6ceee82032

View file

@ -664,7 +664,8 @@ function create_thumb($src, $desired_width = null, $desired_height = null) {
$h = null;
}
$fileName = pathinfo($src, PATHINFO_FILENAME);
$path = parse_url($src, PHP_URL_PATH);
$fileName = rawurldecode(basename($path));
$thumbFile = $dir . '/' . $fileName . '-' . $desired_width . $h .'.webp';
if (file_exists($thumbFile)) {