Welcome Guest, Not a member yet? Register   Sign In
Image not showing in codeigniter 4
#2

(This post was last modified: 11-06-2019, 10:40 AM by Chivinsdev.)

(11-06-2019, 12:19 AM)durairaj Wrote: <img src="<?=WRITEPATH.$value->avatar?>">

this image not displaying

but when i open D:\xampp\htdocs\apptsys\writable\uploads/avatar\avatar_1.jpg link on browser image showing.

After i put directly link in img and not displaying 
<img src="D:\xampp\htdocs\apptsys\writable\uploads/avatar\avatar_1.jpg">

Please help ,

Hello try this I think it will help you get the image. It work for me
PHP Code:
<img src="<?php echo base_url('uploads/avatar/'.$value->avatar); ?>"

But I will prefer you use another location for you files since writable folder is temporal for files.
Use some thing like
PHP Code:
<img src="<?php echo base_url('.public/uploads/images/users/'.$user->avatar);?>"

Instead of saving to the writable folder.
I hope this will help you and others here
Reply


Messages In This Thread
Image not showing in codeigniter 4 - by durairaj - 11-06-2019, 12:19 AM
RE: Image not showing in codeigniter 4 - by Chivinsdev - 11-06-2019, 03:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB