Get image from S3 without full path in sql column

I am adapting a pre-existing custom admin to filamentphp, now I have images on an S3 structured like this:

cdn.blabla.ext/namesite/gallery/{{$game_id}}/{{$image}}

With the old admin I used:

    $filename = rand().'-gallery.'.$request->file('image')->extension();
    Storage::disk('s3')->putFileAs('namesite/gallery/'.$game_id, $request->file('image'), $filename, 'public');
    $article->image = $filename;


To visualize it I would simply use:

<img src="{{\Storage::disk('s3')->url('namesite/gallery/'.$game_id.'/'.$article->image)}}">


But how does it work with filament?
In the documentation I read:

>The column in the database must contain the path to the image, relative to the root directory of its storage disk.

Currently in the database I saved ONLY the name of the image, if I understand correctly I in the database should save:

image = namesite/gallery/123/nameimage.png

can I bypass this?
Was this page helpful?