Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

codingwithrk's avatar

Path is not properly declaring

https://prnt.sc/y4GvZMyCcfkg

When I inspect it https://meggreen.codingwithrk.com//storage/upload/01HM700SZHWAY45102027MWCC1.jpg is the path.

in .env APP_URL=https://meggreen.codingwithrk.com/ ASSET_URL=https://meggreen.codingwithrk.com/public

In resource file Forms\Components\FileUpload::make('image') ->helperText(new HtmlString('Image width: 1920px, Height: 900px | After upload image please click pencil symbol to edit size')) ->image() ->disk('public') ->directory('upload') ->imageEditor() ->required() ->columnSpanFull(),

0 likes
6 replies
alden8's avatar

@codingwithrk If the .env

ASSET_URL=https://meggreen.codingwithrk.com/public

then you can use the path in the template

<img src="{{ asset('storage/upload/01HM700SZHWAY45102027MWCC1.jpg') }}">

which will actually lead to the following path on the img

<img src="https://meggreen.codingwithrk.com/public/storage/upload/01HM700SZHWAY45102027MWCC1.jpg">

Also try clearing the cache

php artisan cache:clear
php artisan config:clear
php artisan view:clear
alden8's avatar

@codingwithrk Perhaps such steps will help fix the problem:

-- check the disk() and directory() methods in your FileUpload component configuration

-- ensure they accurately point to the storage disk and directory containing your uploaded images (ideally within the public storage)

-- verify how the image path is being rendered in the Filament template. Make sure it uses the appropriate Filament helper functions (e.g., url() or image()) to construct the correct path relative to the base URL and storage configuration.

-- ensure the uploaded images have proper permissions for web access

-- review Laravel and Filament logs for any errors related to image upload or path resolution

1 like
alden8's avatar

@codingwithrk I'm glad to help you, my friend. The bug must have a fix, and the question must have an answer)

1 like

Please or to participate in this conversation.