Images and css files not loading on live server |
(05-14-2020, 06:10 AM)Tony.Green Wrote: I am using the latest ci4 and all looks fine on local host but on web server the images are not appearing. I have the images working now but I have not resolved the css file issue yet. Turns out that I chose a png file for my testing that was 74k in size? When I used a jpg or gif file it worked just fine and when I tried a smaller png file it also worked. So I am intrigued about what is causing the image display problem? Any ideas anyone? I can work around this for now but I am hoping that this will not be a show stopper further down the line? Just for anyone else that has to try and fix something like this I have found that having my images in an images folder under public references the images just fine using any of these examples: <img src="images/someimage.png" /> <?php echo img('images/someimage.gif'); ?> (of course with this you will have to have loaded the helper('html') in your controller before echoing the view as it is using the img function from the ci helper) <img src="<?php echo base_url('images/someimage.jpg'); ?> |
Welcome Guest, Not a member yet? Register Sign In |