Browse AI Field GuideForum Podcast
All ThreadsLeaderboard
  1. Discussions

    1. Popular This Week
    2. Popular All Time
    3. Solved
    4. Unsolved
    5. No Replies Yet

knached99's avatar

Uploaded Images in Hostinger shared hosting are not being displayed

I have a Laravel 11 app deployed to Hostinger shared webhosting. The images are not being displayed at all and are returning a 404. One of the links is https://viveaventuras.net/destination/san-juan-puerto-rico where the image returns a 404. in my config/filesystems.php, I've ensured that the root for my public disk, is pointing to the public_html in the shared hosting, like so

knached99's avatar
knached99's avatar jlrdw1yr agoLaravel
1
8
Last reply by jlrdw 1yr ago
riseabove2_2's avatar

Laravel Nova Image::make('Image') dynamic s3 disk

I have different folders in my aws s3 for different types of images, so I have multiple s3 disks in my filesystems.php. I need to be able to dynamically insert the correct driver depending on where the image was stored. In the photo model, there is a column called folder_path, which stores the correct driver ('s3-images' or 's3-crusades') depending on what was used during the o

riseabove2_2's avatar
riseabove2_2's avatar riseabove2...3yrs agoNova
2
1
Last reply by riseabove2_2 3yrs ago
Ligonsker's avatar

How can I use File Response to create array an array of images?

I want to display images that users upload to storage/uploads/ folder which is outside of the website's root folder (Because I don't want other users to have access to each other's uploaded photos). I did a test and tried to use the File Response as described in the docs: https://laravel.com/docs/9.x/responses#file-responses This is how I did it: In web.php: Route::get('show_im

Ligonsker's avatar
Ligonsker's avatar Ligonsker3yrs agoCode Review
4
1
Last reply by Ligonsker 3yrs ago
vainway 's avatar

Filepond in livewire with alpine.js

I integrated filepond in my project, am getting a problem when I upload a file it doesn't show its progress from 1 % to 100% but other things work well and the image view also with no problem. livewire/filepond.blade.js <div class="row"> <div class="col-md-12"> <div wire:ignore x-

vainway 's avatar
vainway 's avatar vainway 3yrs agoLivewire
29
5
Last reply by vainway 3yrs ago
bufferoverflow's avatar

Livewire / Spatie Medialibrary PRO current value

I'm using Livewire components from Spatie Medialibrary PRO to upload user avatars. In the past, I have used Vue components and could pass the :initial-value to the component in order to preview/show the current avatar for the user. But I'm not being able to achieve this with the Livewire version of the components, and the documentation doesn't mention this. I have inspected the

bufferoverflow's avatar
bufferoverflow's avatar bufferover...4yrs agoLivewire
0
1
Scotalia's avatar

File Validation within a Media Model

TL;DR; I am trying to find a better way to validate file uploads from within my custom Media model. I have not found a solution using the Laravel docs. What I have works, but seems too manual and cumbersome. I am wondering if there is a more 'laravel' way to solve this. I am trying to validate file uploads from within a custom Media class. I am not sure if I am overcomplica

Scotalia's avatar
Scotalia's avatar Scotalia4yrs agoLaravel
2
1
Last reply by Scotalia 4yrs ago
RoughLik's avatar

Update images from database and directory

Hi, I created this feature to save multiple images. Everything is fine so far, but I wish I could update them without deleting and adding again Could I proceed with a find id depending on the model used and upload them again? Or how can you delete the old ones and add the new ones instead? if($request->hasfile('images')) { $imageSize = 0; forea

RoughLik's avatar
RoughLik's avatar davy_yg5yrs agoLaravel
1
1
Last reply by davy_yg 5yrs ago
brentxscholl's avatar

Handling pre-existing images when editing a model using Livewire & Filepond

I have a Filepond component that works great for uploading images to a post. However, I'm struggling with Filepond when needing to edit a post and its pre-exisiting images. I want to load Filepond with the Post model's pre-existing images. The goal is to allow the user to upload, delete and reorder the images when editing the Post model, then update the database and the file sy

brentxscholl's avatar
brentxscholl's avatar brentxscho...5yrs agoLivewire
3
3
Last reply by brentxscholl 5yrs ago
Gabotronix's avatar

Can't access uploaded images in the browser

Hi, I'm making an admin panel wich lets you upload and visualize each entry you create, I'm uploading images via AJAX into the following folder: C:\xampp\htdocs\Restaurante1\storage\app\public\uploads Problem is when I append the data into my table the images are not visible since they are not in the public directory, this is what they look like after I print the values with J

Gabotronix's avatar
Gabotronix's avatar Gabotronix7yrs agoGeneral
4
1
Last reply by Gabotronix 7yrs ago
Ifrit's avatar

Getting laravel to save images

I'm using dropzone.js to create a drag and drop section where I can save my images I've managed to be able to have it upload to the correct folder but the issue I'm having is that I'm not able to print my image when I user Print_r. When I use print_r I get a blank array. My Controller public function store(){ $input = Input::all(); $file = Input::file();

Ifrit's avatar
Ifrit's avatar RonB19859yrs agoLaravel
5
1
Last reply by RonB1985 9yrs ago
James_Bhatta's avatar

What is a good image resizing and storing strategy?

A couple of questions. Do you keep the original file uploaded by users in your applications after you resize them ? Do you resize the image to a specific dimension in both axis or just adjust the height or weight and keep the aspect ratio? Is it good approach to save the image path for different size images in a string columns ad json data instead of multiple fields? Please let

James_Bhatta's avatar
James_Bhatta's avatar James_Bhat...5yrs agoGuides
2
1
Last reply by James_Bhatta 5yrs ago
karthik_dev's avatar

What is the best practice to store multiple images in one field.

I want to store the multiple main banner images in a field. I'm getting these images as base64 encoded.I need to decode it into normal images then I need to save the images in the field. public function store(Request $request){ $pageData = PublicPage::firstOrNew(['mainbannerimages' => $request->mainbannerimages]); $arr=[]; for ($i = 0; $i < count($request->ma

karthik_dev's avatar
karthik_dev's avatar jcmargenti...8yrs agoLaravel
1
1
Last reply by jcmargentina 8yrs ago
chrish@diversifiedtechnology.com's avatar

Get a file from storage and send to Digital Ocean error

Hi all, When I initially began with laravel, I didn't know what I was doing, I have a bunch of files that are stored on my server and I need to move them to a digital ocean space. there are 2 things with this; I stored them in a not great way so, i have file names with dates and names. Upon trying to move them I keep getting errors that I cannot seem to track down. I will pos

chrish@diversifiedtechnology.com's avatar
chrish@diversifiedtechnology.com's avatar LaryAI2yrs agoLaravel
1
1
Last reply by LaryAI 2yrs ago
viktort1t0's avatar

Media Library with Livewire

I'm trying to create a Media Library component using livewire. that whenever a user is going to add an image (possibly available for videos in the future), this component shows a modal with all the images that the current user has uploaded and then selects one of them and inserts the info (id or url) in the corresponded field. the component is being called from multiple parts o

viktort1t0's avatar
viktort1t0's avatar viktort1t04yrs agoLivewire
1
1
Last reply by viktort1t0 4yrs ago
iSalam's avatar

looping through images in Laravel blade from subfolders in storage symlink ?

Hi, I am storing images uploaded by user in storage symlink. In storage folder there are multiple subfolders whose names are with id of user and in that subfolder there are images and as well as one more folder named id__revised (that as well contains images). example of directories structure: ->storage (symlink folder in public folder) ->x(folder named with id) ->x

iSalam's avatar
iSalam's avatar iSalam4yrs agoLaravel
6
3
Last reply by iSalam 4yrs ago
Laracast13's avatar

Laravel filepond multi images upload

Hello Using filepond for uploading files. Have filed where uploading multi images <form method="POST" action="{{route('store')}}" enctype="multipart/form-data"> @csrf <input id="photos" name="image[]" type="file" multiple data-allo

Laracast13's avatar
Laracast13's avatar FighterCod...4yrs agoLaravel
9
5
Last reply by FighterCoder 4yrs ago
Phlisg's avatar

PHP or Laravel file storage "async"

Hello all, Using Laravel & Nova in a company project, I am hitting a brickwall in regards of uploading images and php's treatment to save them. So, my context: Media extends Model and has a polymorphic many-to-many relation with multiple other models On these multiple other models, considering the nature of a Many-To-Many polymorphic relation on Nova, I need to create an

Phlisg's avatar
Phlisg's avatar Doougui5yrs agoPHP
1
1
Last reply by Doougui 5yrs ago
Kirk's avatar

Proper way to store images

Hi, I've been brainstorming for a while now about the proper way to store images uploaded by users. Optimisation is a big issue here and I'm looking forward to find a pattern to store images so that they would be accessible easily in the future. First of all any image would be processed to create several thumbnails respecting different sizes, like 100x100 200x200 etc.. so any i

Kirk's avatar
Kirk's avatar maitrefran...9yrs agoTips
5
1
Last reply by maitrefrantz 9yrs ago
ifeanyicode's avatar

Hi guys please help, I'm working on an app that will display multiple images on view.

'' for now, I can be able to upload and save the images in the public path but I can not display them on view. Note: I WAS ABLE TO DISPLAY one on view but displaying all the images user upload at once is not working please help Here is my controller $title = $request->input('title'); $user_id = Auth::user()->id; $body = $request->input('body'); $location = $request->

ifeanyicode's avatar
ifeanyicode's avatar ifeanyicod...3yrs agoLaravel
16
5
Last reply by ifeanyicode 3yrs ago
webfuelcode's avatar

If condition in controller for multiple variables

I am trying to upload two images for the post. And using the if statement for checking if the post has an older image. So here, I am not sure how to use it. I think array would be in use in the place $post->img1. Please correct it for two or more images. if($post->img1){ Storage::disk('my_files')->delete('post_img/' . $post->img1);

webfuelcode's avatar
webfuelcode's avatar webfuelcod...5yrs agoLaravel
0
1
Norbertho's avatar

multiple date picker input /append clear button/

Hi, I have a form where i would like to use 2 datepicker. datepicker itself works fine, but when i would like to append a clear button to the input fields it appends to 2 buttons to both fields. Is there any way to append only 1 clear button to each field which clears the input field where it has been append to? Her is my app.js: require('./bootstrap'); import 'fontawesome-pro

Norbertho's avatar
Norbertho's avatar Norbertho7yrs agoVue
2
1
Last reply by Norbertho 7yrs ago
guillermo_rojas's avatar

Can't capture Image with Dropzone.js

Hi everyone. Once again, I'm stucked and I need some help. I'm making a upload onto local server with a form. This form has a lot of inuts such as name, street name, bla bla bla, and a file input, wich I want to upload about 5 pictures of that prouct. I want to make it with Drozone.js My view {!! Form::open(['route' =>'admin.properties.store', 'method' => 'POST', 'class'

guillermo_rojas's avatar
guillermo_rojas's avatar robrogers38yrs agoJavaScript
1
1
Last reply by robrogers3 8yrs ago
kendrick's avatar

UploadController: multiple Images / Method Question

Hey, I am currently working on my UploadController.php. I want my Users to upload up to five images within the view. How can I manage this within my Controller @store Method? UploadController.php public function store(Request $request){ $this->validate($request, [ 'slider1' => 'max:1600', 'slider2' => 'max:1600', 'slider3' =

kendrick's avatar
kendrick's avatar Snapey8yrs agoLaravel
1
1
Last reply by Snapey 8yrs ago
CosminAndrei's avatar

Multiple images gallery

Hello. I'm trying to create an image gallery where I can add more photos at once. For now, I only managed to add one photo at a time. How could I write the code to be able to add more photos at the same time? My controller : public function index() { $images_salons = SalonsImageGallery::get(); return view('admin-panel.salons.salons',compact('images_salons')); } publi

CosminAndrei's avatar
CosminAndrei's avatar CosminAndr...6yrs agoLaravel
11
1
Last reply by CosminAndrei 6yrs ago
Amalmax's avatar

not uploaded successfully dropzone images thumbnail

m working with dropzone image uploder in laravel. but when I drag images to dropzone box image thumbnail displaying a cross and error. how can fix this problem? my form, @section('content') <div class="row"> <div class="col-sm-10 offset-sm-1"> <h2 class="page-heading">Upload your Images <span id="

Amalmax's avatar
Amalmax's avatar Amalmax7yrs agoLaravel
0
1
Gabotronix's avatar

"Impossible to create the root directory " error when uploading file into public folder

I'm trying to store a file via AJAX to public folder in laravel, however when I submit the form I get the following message: " message: "Impossible to create the root directory "C:\xampp\htdocs\Restaurante1\storage\app\C:/xampp/htdocs/Restaurante1/public/img".", exception: "League\Flysystem\Exception", file: "C:\xampp\htdocs\Restaurante1\

Gabotronix's avatar
Gabotronix's avatar Snapey5yrs agoGeneral
1
1
Last reply by Snapey 5yrs ago

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.

Want us to email you occasionally with Laracasts news?

Nine out of ten doctors recommend Laracasts over competing brands. Come inside, see for yourself, and massively level up your development skills in the process.

Learn
BrowseSeriesCreatorSeriesLaravel PathLarabitsPlayground
Discuss
ForumPodcastSupport
Extras
Gift CertificatesApparelFAQiOS AppTerms
Social
X(Twitter)TikTokYoutube

© Laracasts 2026. All rights reserved. Yes, all of them. That means you, Todd.

Proudly hosted with Laravel Forge and DigitalOcean.