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

(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 ,

This is not a valid URL as far as the browser is concerned when part of an HTML page D:\xampp\htdocs\apptsys\writable\uploads/avatar\avatar_1.jpg.

Also, if you're using the default configuration of CI and serving from the public folder as intended, the writable directory is not accessible from the web. You'll need to either save the files somewhere they're publicly available, or create a new route that acts as a proxy to the images. The second option isn't a bad way, since that allows you to build in other potential restrictions if needed, but also uses more server resources.
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 kilishan - 11-06-2019, 09:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB