{"record":{"id":"11cfd1c0ecf9004d","repo":"octobercms/october","slug":"the-resizer-file-name-is-not-found-11cfd1","errorCode":null,"errorMessage":"The resizer file ':name' is not found.","messagePattern":"The resizer file ':name' is not found\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"warning","filePath":"modules/system/classes/SystemController.php","lineNumber":59,"sourceCode":"            if (System::checkDebugMode()) {\n                return Response::make(e($ex->getMessage()), 404);\n            }\n            else {\n                return Response::make('/* '.e(Lang::get('system::lang.page.custom_error.help')).' */', 404);\n            }\n        }\n    }\n\n    /**\n     * resize an image\n     * @param string $name Combined file code\n     * @return RedirectResponse\n     */\n    public function resize($name)\n    {\n        try {\n            if (!strpos($name, '-')) {\n                throw new ApplicationException(__(\"The resizer file ':name' is not found.\", ['name' => $name]));\n            }\n\n            $parts = explode('-', $name);\n\n            $cacheId = $parts[0];\n\n            $combiner = ResizeImages::instance();\n\n            return $combiner->getContents($cacheId);\n        }\n        catch (Exception $ex) {\n            if (System::checkDebugMode()) {\n                return Response::make(e($ex->getMessage()), 404);\n            }\n            else {\n                return Response::make('/* '.e(Lang::get('system::lang.page.custom_error.help')).' */', 404);\n            }\n        }","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/system/classes/SystemController.php#L41-L77","documentation":"SystemController::resize($name) is the route handler for image resizer URLs (/resizer/{name}), and like the combine handler it requires the name to contain a '-' so it can extract the leading cache id. When the segment has no dash, it throws an ApplicationException ('resizer file not found') naming the malformed input. In production this becomes a 404; in debug mode the raw exception is shown. It is a format guard in front of ResizeImages::getContents($cacheId).","triggerScenarios":"A request to the resizer route where the token lacks the expected id-suffix shape, e.g. /resizer/xyz instead of /resizer/xyz-img.jpg. Typically stale markup/CDN content carrying old-format resizer URLs, or manually constructed image URLs.","commonSituations":"CDN/browser cache pinning old resizer URLs across a deploy that changed the URL scheme; templates hardcoding resizer paths; email templates or third-party integrations reusing expired/malformed resizer links.","solutions":["Regenerate the markup with the `|resize` filter so current-format resizer URLs are emitted","Purge CDN and page caches after deployments that touch asset/image URL generation","Avoid hardcoding /resizer/ paths anywhere; derive them from the source file at render time","Treat isolated hits as noise (404 for bots), unless your own pages emit the bad URLs"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Validate resizer URL tokens before dispatching to the resizer\nif (!str_contains($name, '-')) {\n    abort(404, 'Malformed resizer token');\n}\nreturn \\System\\Classes\\ResizeImages::instance()->getContents(explode('-', $name)[0]);","typeGuard":null,"tryCatchPattern":"try {\n    return \\System\\Classes\\ResizeImages::instance()->getContents($cacheId);\n} catch (\\October\\Rain\\Exception\\ApplicationException $ex) {\n    // malformed token or expired cache — 404 with the original URL as fallback\n    return \\Redirect::to($fallbackOriginalUrl);\n}","preventionTips":["Always emit resizer URLs through the `|resize` filter","Don't cache resizer URLs longer than the underlying app cache","Watch access logs for /resizer/ 404 spikes after deploys"],"tags":["octobercms","image","resizer","http-404","route"],"backgroundTag":"malformed-asset-url","analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}