Image File not Found

Hello . I have a new installation of twill using version 3.3. I run into this error when loading media library navigation. The images get uploaded successfully but do not display [2024-08-20 18:43:03] local.ERROR: Could not find the image `1a437793-b32d-41a8-b18d-ced69955c6aa/image.png`. {"exception":"[object] (League\\Glide\\Filesystem\\FileNotFoundException(code: 0): Could not find the image `1a437793-b32d-41a8-b18d-ced69955c6aa/image.png`. - When i upload the images they upload successfully and i can find them in the storage/app/public/uploads directory Can anyone help thanks
11 Replies
kallefrombosnia
kallefrombosnia5mo ago
Do you have storage linked to the public directory? artisan storage:link
Bradley
BradleyOP5mo ago
Yes i do
kallefrombosnia
kallefrombosnia5mo ago
Check the browser devtools->network or laravel.log It should tell you why images dont load APP_DEBUG should be true
Bradley
BradleyOP5mo ago
This is the error that gets thrown on the backend local.ERROR: Could not find the image 1a437793-b32d-41a8-b18d-ced69955c6aa/image.png. {"exception":"[object] (League\Glide\Filesystem\FileNotFoundException(code: 0): Could not find the image 1a437793-b32d-41a8-b18d-ced69955c6aa/image.png. But like i the image exists in this folder
kallefrombosnia
kallefrombosnia5mo ago
Are you on the win or other OS? file perm could be a problem
Bradley
BradleyOP5mo ago
not sure if there's an initial path that should be set so that the image might have something like app/public/1a437793-b32d-41a8-b18d-ced69955c6aa/image.png I'm on MacOs
kallefrombosnia
kallefrombosnia5mo ago
Ok, nevermind storage link is not needed since this comes from the controller which grabs the image from the storage/app/public/uploads/1a437793-b32d-41a8-b18d-ced69955c6aa/image.png. Can you confirm that your image is in that exact path?
Bradley
BradleyOP5mo ago
Yes the image is there
kallefrombosnia
kallefrombosnia5mo ago
Thats weird. @ifox any idea maybe
tau
tau2mo ago
I have the same problem. I just install new laravel, new twill.
I can upload an image via media gallery but it is not displayed. Although the image is on the server. If you use a direct path to the image, it is displayed without problems. /storage/uploads/d323f46f-b9c3-423f-91c8-8934ae71a827/001.jpg - ok. /img/d323f46f-b9c3-423f-91c8-8934ae71a827/001.jpg - 404 The file is indeed located at /storage/app/public/uploads/d323f46f-b9c3-423f-91c8-8934ae71a827/001. Native image loading on PHP without Laravel / Twill works without errors. Error logs are enabled. I do not see any errors in the logs.
kallefrombosnia
kallefrombosnia2mo ago
Unfortunately, you will need to deep dive into debugging and see whats causing the issue. I would start by finding media controller for /img and there I would debug filesystem and glide operations to see whats causing media file to not be found on the server. But I see on the Github that you already resolved your issue, great.
Want results from more Discord servers?
Add your server