• GoDaddy Community
  • Websites + Marketing | Website Builders
  • Websites + Marketing | Website Builders

    Showing results for 
    Show  only  | Search instead for 
    Did you mean: 

    Images not uploading in php page in laravel application

    Hi All,


    I am using Laravel framework to develop a application, in php page I am trying to upload images by using  <img src="{{URL::asset('images/home_01.jpg')}}"> code. This code is working fine in my local system but not working on Godaddy. Please let me know where I can put my all images in public_html folder.




    3 REPLIES 3
    Resolver I

    It's much easier to use 'relative' paths in web pages. For example, if all your web documents are being served at the html root, meaning not in a subfolder, you probably have a folder named 'images' to hold all your images, so your relative path for src would look like src="images/home_01.jpg". So no matter where you test your code, you don't have to do any renaming of your paths. This is the recommended way regardless of what language you are using.



    Thanks for reply. I tried relative path but that doesn't worked. Is there need to run "php artisan storage:link" command to link files.




    So where is the 'images' folder stored?

    Is it in the same dir as your index.php?

    Try the path: src=/images/yourImages.jpg

    So your php files are looking for them relative to the web url, rather than relative to the php doc. **note the starting forward slash