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

herme's avatar

ImageManager.php line 123 error

Hello İm hosting company due to security PHP Fileinfo extension closed I do what is necessary To recover from this error MissingDependencyException in /home/scriptp2/public_html/application/vendor/intervention/image/src/Intervention/Image/ImageManager.php line 123: PHP Fileinfo extension must be installed/enabled to use Intervention Image. in ImageManager.php line 123 at Image

herme's avatar
herme's avatar herme10yrs agoLaravel
0
1
Ifrit's avatar

How to have more then one $_FILES[]

I know that this isn't really a laravel question even though once I've got this working I will be trying to save the images using laravel, but you guys are alot faster at responding and helping then php forum. I'm busy doing a drag and drop uploader tutorial and I've managed to get it to work with only 1 image, but now I'm trying to do it with 2 separate input files. My image.h

Ifrit's avatar
Ifrit's avatar Ifrit10yrs agoGeneral
0
1
Jmrtech's avatar

File operations within Jobs

I wanted to handle the file operations in my job so the user isn't waiting for the upload. I first ran into errors passing the $request object because it considered it a closure. I then only passed the image itself, but then it said that the image was empty. So I moved the file operations to the controller and left the uploading portion to the job and ended up with this error:

Jmrtech's avatar
Jmrtech's avatar Jmrtech10yrs agoLaravel
0
1
SangminKim's avatar

The file "/private/var/folders/..." does not exist

I'm trying to upload a jpg file to a public folder by implementing the following codes private function save_image($request) { $current_time = Carbon::now('America/Vancouver'); $year = $current_time->year; $month = $current_time->month; $day = $current_time->day; $hour = $current_time->hour; $minute = $current_tim

SangminKim's avatar
SangminKim's avatar SangminKim10yrs agoLaravel
6
1
Last reply by SangminKim 10yrs ago
kylevorster's avatar

Proper code writing with formatted error control

Hey, I know this is a very vague question but I hope someone might have the time to just look at this code and tell me what they think, could I do error controlling better or does it seem fine. <?php Route::post('/add', [ 'as' => 'SliderAdd', 'uses' => 'Admin\SliderController@store' ]); class StoreImageFileRequest extends Request { public function authori

kylevorster's avatar
kylevorster's avatar kylevorste...10yrs agoCode Review
1
1
Last reply by kylevorster 10yrs ago
Demers94's avatar

Symbolic link from storage to public not working

Hi, I'm building an application where user can upload mods. I'm storing the images for the mods in the /storage folder. Here's what the path looks like for a mod image : /storage/mods/{ mod_id}/images/{ filename.extension} Since we can't directly access the files in /storage from views, I made a symbolic link from the storage/mods to public/mods, using this command while in my

Demers94's avatar
Demers94's avatar aunicajint...8yrs agoLaravel
11
9
Last reply by aunicajinternational 8yrs ago
Exayne's avatar

TokenMismatchException when uploading Gif or MP4

Hello, I'm pretty new to Laravel. I have a page for editing the current user's avatar. It works well if I chose a jpg or png file. My form validation rules for the file is "Image", so I should be able to upload a gif, right ? The rule works because if I upload a php file, I just get the validation error message. But when I chose a gif file, I got the "TokenMismat

Exayne's avatar
Exayne's avatar Exayne10yrs agoLaravel
1
1
Last reply by Exayne 10yrs ago
intossh@gmail.com's avatar

Homestead or linux server for development

Hi, I am new to Laravel, and I still can't decide how to set up a development env. I used to use Codeigniter, my setup was that I use Netbeans, which is set to upload all changes to FTP on a server, where all websites were available. I also used SVN because I am working both from my work laptop and my home PC on the same project. I also sometimes need the dev state of project

intossh@gmail.com's avatar
intossh@gmail.com's avatar InToSSH10yrs agoTips
2
1
Last reply by InToSSH 10yrs ago
Flof's avatar

Having problem with requests seeming not to work, but not erroring!

So I am learning not only Laravel but also the ideas in MVC I will eventually move this logic out of my controller and into a model, but in the mean time I am just trying to get it to work. use Input; use Validator; use Redirect; use App\Http\Requests\PhotoRequest; use Illuminate\Support\Facades\Request as FileRequest; class AdminController extends Controller { public f

Flof's avatar
Flof's avatar Flof10yrs agoLaravel
0
1
tundeopaleye's avatar

Database Images not Displaying Anymore (shortly after deployment to Forge)

Not sure it's necessarily because of the Forge-Envoyer deployment, but some time after I successfully upload a picture and it displays correctly, it's suddenly unavailable after a day or two. I suspect the name in the database (generated by the time() function) changes so it can't find the initial image name. I also use "Imagine" for resizing but I don't think this af

tundeopaleye's avatar
tundeopaleye's avatar tundeopale...10yrs agoGeneral
0
1
Ara's avatar

Queuing a FileUpload

Hi guys, So I am trying to queue a file upload by creating a job. Here is the code I have so far: if($request->hasFile('photo')) { $path = "/img/members/{$member->slug}/"; $photo_filename = str_replace(" ", "_", strtolower($request->file('photo')->getClientOriginalName())); $member->ph

Ara's avatar
Ara's avatar Ara10yrs agoLaravel
0
1
ElpsySec's avatar

Using the Storage Feature vs placing images in public/img

I have some thumbnails and I don't know whether to place them public/img or use Laravel's storage API. I'm going to be using the Storage File system anyways to upload the thumbnails, but what should i do about displaying them? Should I write a function in the Model that copies the photo to public/img when it's needed? Should I not worry about having thousands of photos in publi

ElpsySec's avatar
ElpsySec's avatar ElpsySec10yrs agoGeneral
0
1
Alizey's avatar

Simple Logic

I have a table with 5 image fields like img_1 img_2 img_3 img_4 img_5 how can i upload images in these fields. ? I have to make sperate browse buttons for that 5 fields or there is any better way

Alizey's avatar
Alizey's avatar Alizey11yrs agoGeneral
6
1
Last reply by Alizey 11yrs ago
bigblueboss's avatar

Photo Uploads on Mobile?

I saw some stuff about image intervention and all but I have a general question. I can imagine what photo uploads might look like in desktop. You probably click a browse or upload button and it will take you into a folder structure where you can navigate your computer's directory. If I had this exact same browse button while viewing it through a mobile browser, what would happe

bigblueboss's avatar
bigblueboss's avatar RachidLaas...11yrs agoLaravel
3
1
Last reply by RachidLaasri 11yrs ago
Mikaelo's avatar

Getting ID of uploaded file

Hello guys, I am working on a simple file uploading and experiencing a small problem. I have function addNewArticle which handles getting some data from the form and then inserting them into database via Eloquent. Now there is a field image_id which I need to fill with the ID of uploaded file/image. But I dont know how to get this ID? (When saving the image name and url into d

Mikaelo's avatar
Mikaelo's avatar bestmomo11yrs agoLaravel
8
1
Last reply by bestmomo 11yrs ago
Qlic's avatar

Storage saves files as 23 bytes files

Hi Guys, I am trying to get the storage to work, but all the files i upload are only 23bytes in size and thus unusable. Is there something i'm doing wrong here? if (Request::hasFile('attachments')) { foreach (Request::file('attachments') as $file) { if (substr(File::mimeType($file), 0, 5) == 'image') { Storage::disk('local')->put('project/

Qlic's avatar
Qlic's avatar pmall11yrs agoGeneral
3
1
Last reply by pmall 11yrs ago
ctaljaardt's avatar

S3 Visbility For images

Hello. I have made it where a user can upload a profile picture, the problem is that the image's visibility is alwyas set to owner and therefore other cannot view the image becuase you get an accessed denied. how would i pass the ACL public-read to amazon with the file to make it publicly visable?

ctaljaardt's avatar
ctaljaardt's avatar ctaljaardt11yrs agoGeneral
2
1
Last reply by ctaljaardt 11yrs ago
hachiman's avatar

save $fileName to database

I have a avatar upload thingy and i want to save the filename in the database public function avatarupload() { $input = Input::all(); if (Input::hasFile('avatar')) { $fileName = 'avatar_'.$this->user->id; $image = Image::make($input['avatar']); $image->resize(300, 300); $image->save(public_path(

hachiman's avatar
hachiman's avatar hachiman11yrs agoGeneral
2
1
Last reply by hachiman 11yrs ago
code_chris's avatar

intervention/image hitting php memory_limit

Hi guys, I don't usually post looking for help as I can usually find a solution by searching, but this one's got me stumped. I am building a website which allows the user to upload multiple images and then on the server I use intervention/image to resize and save them. This has been working fine on my vm but when I run it on the server it sometimes hits the memory_limit. I have

code_chris's avatar
code_chris's avatar bashy11yrs agoGeneral
9
1
Last reply by bashy 11yrs ago
nolros's avatar

L5 File Validation Issues

Ok, not me, file validation via FormRequest not working properly. 'Required' works fine, but max: , image, mime, etc. either don't execute or if they do they don't generate a Session error. Example, if I add mimes:jpeg,bmp,png,gif it will fail if it is not an image and just do a redirect back with no error messages in session. I've tried single, multi file upload. Also, attem

nolros's avatar
nolros's avatar bestmomo11yrs agoGeneral
2
1
Last reply by bestmomo 11yrs ago
selim's avatar

Public path not writable

Ok, so I am trying to upload a file and I think my script is ok. I am getting an "can't write image data to path" exception. dd(is_writable($path . $filename)); returns false, I just can't figure out why. I am using Laravel 4.2 with Homestead and vagrant. I tried to sudo chmod -R 777 the path I am trying to upload the file to, and I also tried the same on mypc/Homestead. I w

selim's avatar
selim's avatar marktbonus10yrs agoGeneral
6
1
Last reply by marktbonus 10yrs ago
theUnforgiven's avatar

Folders and Docs

What is the best way to achieve this- http://cl.ly/image/1a0P1U2Y3N2q I've built a mini cms and the client wants to upload specific docs to specific folders which I've done, but then showing this within the CMS like the attached image, how would I do this?

theUnforgiven's avatar
theUnforgiven's avatar lstables11yrs agoGeneral
4
1
Last reply by lstables 11yrs ago
afrayedknot's avatar

Secure and store uploads from malicious users and files

So I'm writing an app at the moment that will accept files from users. These files can be sent via upload, inbound email (through mandrill - but it basically 'posts' them to the server) and dropbox. How can I ensure the security of the files, so that users cannot upload anything malicious? i.e. a .htaccess or .php file? Or an image that has code inside of it etc. I need to al

afrayedknot's avatar
afrayedknot's avatar bashy11yrs agoGeneral
1
3
Last reply by bashy 11yrs ago
thesnakebite's avatar

Media Uploads for Workshop the Laravel Course - Best Approach?

Following Jeffrey, Jeremy, and Simon's Workshop the Laravel, I extended the application with search, bookmarks, and guest access. Now I want to add image/video uploads to posts. Stack: Laravel 12 + Inertia v2 + Vue 3 Requirements: 1-4 images OR 1 video per post Image preview before publishing Display in the timeline Options I'm considering: Native Inertia useForm() + file in

thesnakebite's avatar
thesnakebite's avatar thesnakebi...5mos agoLaravel
0
1
iamlux20's avatar

FileUpload - Uploaded but gets 404'd

Hello, I am experiencing this in the production but not in local server. I have this FileUpload, it works "perfectly" fine except on this specific file. (https://imgur.com/a/WmMyRMD) All of them are uploaded successfully, I can see them on the server with the same file permissions and all are saved in the database column of the ID. However, the red highlight doesn't s

iamlux20's avatar
iamlux20's avatar iamlux201yr agoFilament
2
1
Last reply by iamlux20 1yr ago
0xlaradev's avatar

$request->hasFile('file') doesn't detect uploaded file

Hi! I'm trying to figure out why $request->hasFile('file') is not detecting an uploaded file. I'm sending the file via Javascript using an XMLhttprequest like this: (function() { var HOST = "http://127.0.0.1:8000/storage/" var sendRequestUrl = "http://127.0.0.1:8000/api/v1/store-image" function createStorageKey(file) { var date = new D

0xlaradev's avatar
0xlaradev's avatar dlom2yrs agoLaravel
3
5
Last reply by dlom 2yrs ago
anonymouse703's avatar

How to display image from a local storage?

The project setup is they separate file migration where the the image url is stored either local or server.. in the edit component I want to display old image but I got error edit:23 GET http://color-game-api.test/storage/local/host_photos/jJPxbvcfWybsi5sOsRZqNx2ytn7HKHklvNpb46ms.jpg 404 (Not Found) this is the code const props = defineProps({ ho

anonymouse703's avatar
anonymouse703's avatar anonymouse...2yrs agoVue
2
1
Last reply by anonymouse703 2yrs ago
YuMp's avatar

Doubt about sending and processing and uploading possible jpg, mp4, gif files contaminated by malware

Doubt about sending and processing and uploading possible jpg, mp4, gif files contaminated by malware Using these validation rules in the controller of a laravel application restricts the sending of a file infected by a virus, be it an image, video or gif? protected $rules = [ 'image' => 'nullable|image|mimes:jpeg,jpg,png|max:18048', 'video' => 'nullable|mimes:mp4|max:950

YuMp's avatar
YuMp's avatar LaryAI3yrs agoLaravel
1
1
Last reply by LaryAI 3yrs ago
charlesmun's avatar

Image not displaying

Am stuck and can't figure out why my images are not displaying. Index function to send the services to the view public function index(){ $services = Service::all(); foreach($services as $service) { $service->feature_image = Storage::url($service->feature_image); } return view('services.index')->with([ 'services

charlesmun's avatar
charlesmun's avatar charlesmun3yrs agoLaravel
12
1
Last reply by charlesmun 3yrs ago
johnef_sh's avatar

The file "login_img.jpg" was not uploaded due to an unknown error.

here is my form in blade <form action="{{ route('add.new.album') }}" method="post" enctype="multipart/form-data"> @csrf <div class="form-body"> <h5 class="form-section"> <i class="ft-user"></i> Albu

johnef_sh's avatar
johnef_sh's avatar Snapey3yrs agoLaravel
1
1
Last reply by Snapey 3yrs ago
Arturexe's avatar

Uploading files to Google Drive slows down website

I'm building my first gallery site, which includes uploading large amounts of images to an external storage (in my case Google Drive). For that I'm using this driver: https://github.com/masbug/flysystem-google-drive-ext My loop looks like this (currently placed in a Controller): foreach ($request->chunk as $image) { $mime = mime_content_type($image); $ex

Arturexe's avatar
Arturexe's avatar matfish23yrs agoLaravel
3
1
Last reply by matfish2 3yrs ago
JD45's avatar

Multiple Uploads with Inertia

Hello, Thank you in advance for any help or pointing me in the right direction. I've Google'd this to death, but still haven't found a viable solution. I'm using Laravel as my backend with Inertia and Vue. I am also using PrimeVue for UI components. The trouble I'm having is understanding how to handle multiple images with Inertia's form helper. As an example, I'm using this co

JD45's avatar
JD45's avatar anchan422yrs agoInertia
7
7
Last reply by anchan42 2yrs ago
Scorzio's avatar

Images don't save using Faker Image in seeder

I'm doing a project on Laravel 7 with FakerPHP, I want to populate my database with some random images and at the same time saving them on my local storage folder, but they can't get stored in the folder and I don't know why. Here's my seeder: for ($i=0; $i<20; $i++) { $newApartment = new Apartment(); $newApartment->image = $faker->image('public

Scorzio's avatar
Scorzio's avatar aureliansp...4yrs agoLaravel
3
1
Last reply by aurelianspodarec 4yrs ago
Rumnaz khan's avatar

Laravel API for posting image in Flutter

hi! I was making API for laravel application that stores transaction information of a company. with every transaction there will be an invoice jpg file uploaded. the info will be sent through Flutter application. transactionApiController: if ($request->hasFile('image')) { $file = $request->file('image'); $name = uniqid().$file->getClientOrig

Rumnaz khan's avatar
Rumnaz khan's avatar imrodrigoa...4yrs agoCode Review
1
1
Last reply by imrodrigoalves 4yrs ago
ellinia's avatar

Cannot get image to display in blade view - Laravel 8

I have an image located in /my_project/public/uploads/avatars/1/testfile.jpg In my blade view I am trying to show this image but the image won't load and the link is broken. When I inspect element in browser it is shown as <img src="/uploads/avatars/1/testfile.jpg"> The permission for the folder in Linux are: drwxr-xr-x 4 www-data www-data 4096 Dec 17 17:50 u

ellinia's avatar
ellinia's avatar ellinia4yrs agoLaravel
3
1
Last reply by ellinia 4yrs ago
Mansu's avatar

How to access the image from storage?

I have uploaded the pictures in a storage folder /public_html/storage/app/public/images ็How can I show the image in blade? I already done the command php artisan storage:link It's work ok in my local but I can't show it in my livesite

Mansu's avatar
Mansu's avatar Mansu4yrs agoLaravel
8
1
Last reply by Mansu 4yrs ago
keven1508's avatar

Storing image by a mutator in model, should or not? and mass assignment

Hello, Background information a Common class contains a static saveImage method which simply stores an image and returns a filename. a User model that has profile_pic field as string a UserController controller with save method for handling data from user input Questions: Should I use mutator to handle file uploading so that I can do something like this in UserControler publi

keven1508's avatar
keven1508's avatar martinbean4yrs agoLaravel
5
1
Last reply by martinbean 4yrs ago
unknownUser17's avatar

Laravel Image not showing on production

I am hosting my project on Hostinger and have created a symlink link from public/storage to storage/app/public, the uploaded images are stored in storage/app/public as well. I access the image using {{ asset( 'storage/' . $data->image ) }} in my blade file, but the images did not display on my website. I have tried this and it returns error 404. https://www.thehawkermarketp

unknownUser17's avatar
unknownUser17's avatar upspark1yr agoLaravel
33
44
Last reply by upspark 1yr ago
azular23's avatar

Passing uploaded file to queue job

Hi guys, im having trouble passing uploaded file(image) to one of my queue worker. I keep receiving an error of Serialization of 'Illuminate\\Http\\UploadedFile' is not allowed Which if I understand correctly that I need to store my uploaded file to the storage, fetch it and then pass it to one of my queue worker. But how can I do it correctly? Thank you so much Filesystem.php

azular23's avatar
azular23's avatar chaudigv5yrs agoLaravel
1
1
Last reply by chaudigv 5yrs 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
extjac's avatar

Intervention Image

I have people uploading pictures with dimensions over 7000 by 7000 px. and the server cant process them. How much memory do you allocate to the server to be able to handle large image dimensions.

extjac's avatar
extjac's avatar gitwithrav...5yrs agoGeneral
1
1
Last reply by gitwithravish 5yrs ago
BrianA's avatar

Loading An Image From Storage In Blade View (Protected)

Hi, I need to show an image in a Blade view , however, I do not want the images to be public. Only the users who need to see a particular image can have access to it. This is what I was doing before realizing that the images must not be accessible by anyone if the path is known/guessed: I was storing images (which are uploaded by an admin) in storage/app/public/uploads/iotpar

BrianA's avatar
BrianA's avatar BrianA5yrs agoLaravel
2
1
Last reply by BrianA 5yrs ago
Korbe's avatar

General Image Management Struggles - Eloquent - CMS

I built a website (Larvel/Vue) which lets you create a little information page. Some would say it's a CMS or a simple site builder. Im currently trying to add images to the items* (see db below) but I'm struggling with the general workflow the laravel way. (no problems with basic upload/store though) The information page is seperated into sections and for example a Team Section

Korbe's avatar
Korbe's avatar Korbe5yrs agoCode Review
2
1
Last reply by Korbe 5yrs ago
abhishek009's avatar

Which Image CDN is best for startups ?

Hi there, I'm looking for CDN image provider for my startup. I will be using it for uploading profile pictures and other user's images on it. Looking for cheap provider. Can anyone suggest me ? Thanks!

abhishek009's avatar
abhishek009's avatar Sinnbeck5yrs agoLaravel
4
1
Last reply by Sinnbeck 5yrs ago
NielsNumbers's avatar

Vue Form With File Uploads?

I am using the form object approach from https://laracasts.com/series/learn-vue-2-step-by-step/episodes/19 However, I also have file uploads in my form. Instead of data.set(field, this[field]); I need to call something like data.append('coverImage', this.cover); or if(this.images.length > 0){ this.images.forEach(function(image){ data.append('gallery[]', imag

NielsNumbers's avatar
NielsNumbers's avatar NielsNumbe...5yrs agoVue
0
1
monstajamss's avatar

Image not storing/saving

I am trying to save image in my public folder private function storeImage($post) { if (request()->hasFile('featured_image')){ $original = request()->file('featured_image')->getClientOriginalName(); $post->update([ 'featured_image' => request()->file('featured_image')->storeAs('uploads', $original),

monstajamss's avatar
monstajamss's avatar monstajams...6yrs agoLaravel
2
1
Last reply by monstajamss 6yrs ago
datarecall's avatar

Vapor Image Optimization

We are looking at deploying a site on Vapor, however we have a lot of files that are user uploaded (we can store on s3) but is there a way to use some sort of Image Optimization so we can optimize these files prior to them hitting s3? I might be wrong but since you can't install any 3rd party software I cant see it being possible and not much in the way of googling has helped.

datarecall's avatar
datarecall's avatar datarecall6yrs agoVapor
2
1
Last reply by datarecall 6yrs ago
asadsajjad's avatar

Undefined variable: data and limit uploading items to max 3

I am trying to update the product and for that I am updating the pictures. I meant if user want to add more pictures to it but when I do this I get below error Undefined variable: data Also I want to restrict the total uploading pictures to max 3 pictures or 2 pictures and 1 video When I add a video it does not show like it does not play Any help would be great. Thank for t

asadsajjad's avatar
asadsajjad's avatar asadsajjad6yrs agoLaravel
3
1
Last reply by asadsajjad 6yrs ago
Neeraj1005's avatar

how can I store image using java script or ajax?

This line shows me an error plz fix this var image = $('#clientimage' + id).prop('files')[0]; <div class="row"> @foreach($client as $clie) <div class="form-group" id="mydiv1"> <label for="myid1" class="col-form-label">Myid1:</label> <input type="text" id="myid

Neeraj1005's avatar
Neeraj1005's avatar Neeraj10056yrs agoLaravel
0
1
PK_06's avatar

Image Intervention

Hi Everyone, Can you help me with this problem? Unable to decode image from file And I got this exception Intervention\Image\Exception\NotReadableException Im using Image Intervention package to process thumbnail size images. It is working with smaller images but it seems that error/exception appearing if images are 180mb+. Im using those configuration to manipulate php_ini con

PK_06's avatar
PK_06's avatar PK_067yrs agoLaravel
5
1
Last reply by PK_06 7yrs 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.