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

sanjayacloud's avatar

Load File path in html input (default value)

Hi Guys,

I am trying to update images where coming from array. I want to know how to load image file path in input value. I did it like

<input type="file" id="action_json" name="featured_image[]" class="form-control" value="{{$obj2->image}}">

After that I got "getClientOriginalExtension() on null " Error. Anyone has a solution for this. My image path save in database column like below.

{["image":"UyxiIclQSQ1556793102.png"},"image":"Rdfl1KVgug1556793102.png"}]
0 likes
1 reply
tisuchi's avatar

Can you show your code how do you retrieve image data?

I think you should you foreach the retrieved array and then get each particular image.

Please or to participate in this conversation.