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

AlexanderKim's avatar

[L4] ImageCache 500 internal server error

Here's my: app/config/packages/intervention/imagecache/config.php: return array( /* |-------------------------------------------------------------------------- | Name of route |-------------------------------------------------------------------------- | | Enter the routes name to enable dynamic imagecache manipulation. | This handle will define the

AlexanderKim's avatar
AlexanderKim's avatar heihachi8810yrs agoGeneral
2
1
Last reply by heihachi88 10yrs ago
IsaacBen's avatar

Escaping html from users

I have a small problem. I'm allowing users to upload caption to an image but since it can be too long I've added a link with "read more" and to show it properly I'm using {!! $string !!} otherwise it will print the HTML tags. On the other side I don't want users to insert HTML code, is there a way to allow it once for me?

IsaacBen's avatar
IsaacBen's avatar sitesense10yrs agoLaravel
4
1
Last reply by sitesense 10yrs ago
kamish's avatar

the server responded with a status of 405

Hi, I built application that allows updating and uploading posts. Post-update via ajax I do, but for some reason I get an error of "POST 405 (Method not allowed)". Here's the code: $("form#updata_post").submit(function(event){ event.preventDefault(); tinyMCE.triggerSave(); text_body = $("#body").val(); $("#al

kamish's avatar
kamish's avatar Graham11yrs agoGeneral
1
1
Last reply by Graham 11yrs ago
ridewn's avatar

Laravel 5 commands and eloquent objects

Hi everyone, I'm a bit confused as to what a command should exactly do. I get that it is an instruction, but say I have a method in my controller to upload a file, and an image to go along with that file. So I create a UploadFiles command, and have the logic to upload the files and image. My question is: should I have the logic to create the model in the database in the command

ridewn's avatar
ridewn's avatar adar11yrs agoEloquent
1
1
Last reply by adar 11yrs ago
kamish's avatar

passing json array to jquery

Hi , I try to read through the ARRAY jQuery I was taking through JSON , but the response is " undefined" . How can I pass an array from routes to JQ ? The idea is to return the names of the images that arose through the array . Here's the code : Route::post('upimage', function(){ $i = rand(); foreach (Input::file("image") as $image) { $imagename = time(). $

kamish's avatar
kamish's avatar milon11yrs agoGeneral
1
1
Last reply by milon 11yrs ago
mateog98's avatar

I upload a post and the image is not being visualized

Im uploading posts that are images and they are being stored in my storage folder but they are not being visualized in my browser. It appears as if there is a post but the image is not being showed. I already have a storage:link. This is my store function in my PostsController: public function store (Request $req) { $rules = [ "image" => "requir

mateog98's avatar
mateog98's avatar vincent150...3yrs agoLaravel
10
1
Last reply by vincent15000 3yrs ago
aleksov's avatar

Issue with Image Intervention when try to upload

I have this controller and trying to post image into /images folder so I write: public function store(Requests\VoucherRequest $request) { //$photo= null; $file = array('photo' => $request->file('photo')); // setting up rules $rules = array('photo' => 'required|image|max:10000'); //mimes:jpeg,bmp,png and for max size max:10

aleksov's avatar
aleksov's avatar Nagibaba9yrs agoGeneral
10
2
Last reply by Nagibaba 9yrs ago
jfranc014's avatar

NotReadableException when trying to upload svg files. Using Intervention Image for image modifications

Hi, I'm using the Intervention Image package to make some modifications to images (like resizing) after they've been uploaded. However for svg files this hasn't been possible, getting the following exception: NotReadableException in Decoder.php line 21: Unable to read image from file (/tmp/phpapVWWg). I can't really figure out what the problem is. The following is the code used

jfranc014's avatar
jfranc014's avatar nurudeen.a...3yrs agoLaravel
2
1
Last reply by nurudeen.ajayi 3yrs ago
JackD's avatar

image optimization before or after upload

Hi! i just wonder if there's a way to optimize the image to lower it's file size after upload using a form? anyone tried this before? thanks ci

JackD's avatar
JackD's avatar Ci11yrs agoGeneral
2
1
Last reply by Ci 11yrs ago
ammar_ahmed's avatar

The image is not uploading in livewire and breeze.

I install breeze with volt livewire for my project. I add image filed for user to upload there profile picture but when i submit the form and get the ErrorException Trying to access array offset on null. <?php use App\Models\User; use Livewire\Volt\Component; use Livewire\WithFileUploads; use Livewire\Attributes\Layout; use Illuminate\Validation\Rules; use Illuminate\Suppor

ammar_ahmed's avatar
ammar_ahmed's avatar Raja_Ammar1yr agoLivewire
16
1
Last reply by Raja_Ammar 1yr ago
nho's avatar

Uploading pdf to Image data column in SQL

Hi, I have a requirement to upload pdf documents into an Image data type column within my sql database. I know that its better practice to store images as file locations, but this is an old database and is very integrated into the current ecosystem so I'm not able to make that change. Here is the code that I am currently using: $documentImage = new documentImage(); $documentIma

nho's avatar
nho's avatar nho3yrs agoEloquent
0
1
hamzaelmaghari's avatar

Jetstream photo upload

Hi devs! I need you to provide me with help, I need to add user image banner to their profiles. I didn't understand the functionality to add a new image I wanted them to upload their banner when access their settings page. not talking about profile photo feature provided by jJetstream. Thanks,

hamzaelmaghari's avatar
hamzaelmaghari's avatar jlrdw4yrs agoLaravel
1
1
Last reply by jlrdw 4yrs ago
lucasantonio's avatar

Livewire filed upload

I have a code that I made and the entire upload process works perfectly on my local machine. When I put into production and select an image the livewire tries to upload and the upload error. My code: $fileName = Str::slug($data['title']).'.'.$data['thumb_path']->extension(); $data['thumb_path']->storeAs("public/thumb",$fileName); $data['t

lucasantonio's avatar
lucasantonio's avatar lucasanton...4yrs agoLivewire
1
1
Last reply by lucasantonio 4yrs ago
prince69's avatar

Image is not display in server but in localhost works fine

Image in not shown on sever but in locally, It wokrs perefect. In this way, I store image if ($request->has('image')) { $filename = $request->image->getClientOriginalName(); $request->image->storeAs('avatar/users/', $filename, 'public'); } Here is in view blade <img src="{{ asset('/storage/avatar/users/' . auth()->user()->

prince69's avatar
prince69's avatar Snapey3yrs agoLaravel
11
8
Last reply by Snapey 3yrs ago
Norbertho's avatar

PDF as image

Hi, Is there any option to display PDF files as image in laravel ? Basically i upload a PDF document and i would like to display the PDF content on my page as an image. I wanted to use this package: https://github.com/spatie/pdf-to-image But exec() disabled on the server i use so this package is not an option for me.

Norbertho's avatar
Norbertho's avatar Norbertho5yrs agoLaravel
0
1
OutlawPlz's avatar

Testing file upload

Hi guys, I'm trying to test a file upload, but the name of the uploaded file is different from the hash name of the file in test class. Due to the different name the test case is failing, even though the code works properly. I read the docs and I think my test case is doing everything right... Hope someone could help me, thanks! Relevant code is in uploadProfileImageFor() and a

OutlawPlz's avatar
OutlawPlz's avatar OutlawPlz5yrs agoTesting
1
1
Last reply by OutlawPlz 5yrs ago
mbo's avatar

How to upload a file to do spaces

Good day, I have a form why user can upload files by ajax script. Currently the preload places the files on my local webserver. The connection with DO spaces works. But i can't get it working to rewrite the code below so it places the file on my do spaces. I tried to work with: storage::disk('do-spaces')->PutFileAs(); But i don't get it running with the code blowe (some e

mbo's avatar
mbo's avatar mbo6yrs agoLaravel
0
1
eggplantSword's avatar

How to limit upload files to one per item total, could be img or vid

I'm trying to create a survey question that has the possibility to upload multimedia be it an image or a video, however it should only be one image or video, not one of each. The columns are called image and video respectively, can this be done in the request or on the vue.js front end, I don't mind either solution. What would be the best way to do this? This is the SurveyQuest

eggplantSword's avatar
eggplantSword's avatar msslgomez6yrs agoLaravel
4
1
Last reply by msslgomez 6yrs ago
AbehoM's avatar

Image gallery with create and edit support

I'm planning on creating an image gallery with Laravel and Vue. This thread is not actually me asking for code but looking for the best approach so I can write the code. Here is what I want to do (for create): The user will click to select an image or drag and drop: Then the cropping will appear: When the user crops the image will appear on the gallery: Behind the scenes wha

AbehoM's avatar
AbehoM's avatar fylzero6yrs agoGeneral
1
1
Last reply by fylzero 6yrs ago
mDelshad's avatar

Upload multiple images

In the form, I take 3 pictures of the user to upload and I want every image to be saved in a separate row in table please help thanks

mDelshad's avatar
mDelshad's avatar mariohbrin...7yrs agoLaravel
1
1
Last reply by mariohbrino 7yrs ago
waheed.imtiaz's avatar

laravel 5.4 is there a way i can save unisharp filemanager standalone image

Hi laracasts forum. is there a way i can save unisharp standalone image file name in my model. and then get in edit form. let me explain what i mean. i want to make featured image for my articles model. i want to get that featured image in unisharp filemanager standalone button when i click and get select previous uploaded image i want to save that image name in my model articl

waheed.imtiaz's avatar
waheed.imtiaz's avatar waheed.imt...8yrs agoLaravel
0
1
xuuto's avatar

laravel 5.4 is there a way i can save unisharp filemanager standalone image

Hi laracasts forum. is there a way i can save unisharp standalone image file name in my model. and then get in edit form. let me explain what i mean. i want to make featured image for my articles model. i want to get that featured image in unisharp filemanager standalone button when i click and get select previous uploaded image i want to save that image name in my model articl

xuuto's avatar
xuuto's avatar xuuto9yrs agoLaravel
0
1
tim3011's avatar

file upload not working on android

I am trying to upload pictures from a form which works fine on a desktop and on a mobile the files are not being uploaded $destinationPath = 'uploads'; // upload path $extension = Input::file('picture')->getClientOriginalExtension(); // getting image extension $fileName = rand(11111,99999).'.'.$extension; // renameing image Input::file('picture')->mo

tim3011's avatar
tim3011's avatar gbvacco8yrs agoLaravel
2
1
Last reply by gbvacco 8yrs ago
vnc00's avatar

Responsive image versions

Hi, I would like to load different background images by device type (mobile, tablet, laptop, desktop/large screen). Any ideas how to do that in a nice way? I need to deposit different versions of an image (which I edit before upload with photoshop for example for perfect sizing) and show the correct picture by device type - completely dynamically. My idea: Schema::create('files

vnc00's avatar
vnc00's avatar jlrdw9yrs agoCode Review
1
1
Last reply by jlrdw 9yrs ago
aleksov's avatar

Upload photo with form

I use laravel 5.1 and I need to store photo into folder /images. I have store function: public function store(Requests\VoucherRequest $request) { //$photo= null; $file = array('photo' => $request->file('photo')); // setting up rules dd($request->file('photo')); $rules = array('photo' => 'required|image|max:10000'); //mim

aleksov's avatar
aleksov's avatar aleksov9yrs agoGeneral
5
1
Last reply by aleksov 9yrs ago
italoborges's avatar

Change filename after upload Laravel Stapler

I'm using the Stapler Lib to make the image uploads. The image's filename is generated by image description field. After the upload, the user can change the image description and after that, I need to update the image filename. Is there a way to do this using the Stapler Lib? I have been thinking in something like this: $product->image->instanceWrite('file_name', 'other_d

italoborges's avatar
italoborges's avatar italoborge...9yrs agoGeneral
3
1
Last reply by italoborges 9yrs ago
david001's avatar

Data not saved and image not uploaded

My data(title and images name) are not saved in database and images not uploaded to public directory.I got data saved message but my data is not saved in database . i have a form with two fields title input field and browse image field .i have add more button ,from which javascript generates again two more fields each time user click that button. public function postUpload(Req

david001's avatar
david001's avatar david0019yrs agoCode Review
8
1
Last reply by david001 9yrs ago
Shiva's avatar

image function not 100%

I'm not sure what is going on, in most of my modules I have an image section where I can upload images and save them, but when I add an image section to another module it doesn't work and I can't seem to figure out why since it's using the same code and that code is working. this is the code I've been using. create.blade.php {{ HTML::script('js/test.js') }} <script type=&quo

Shiva's avatar
Shiva's avatar sitesense11yrs agoGeneral
42
2
Last reply by sitesense 11yrs ago
afoysal's avatar

addEventListener is not working

I am working with ckeditor. I am using below code. addEventListener is not working here. function imageSelect(evt) { alert('hello'); } CKEDITOR.on( 'dialogDefinition', function( ev ) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'image' ) { dialogDefinition.addContents({ id : 'uploadTab',

afoysal's avatar
afoysal's avatar LaryAI3yrs agoJavaScript
1
1
Last reply by LaryAI 3yrs ago
afoysal's avatar

Fetch text box value of a tab of Dialogue box of Ckeditor

I am trying to fetch text box value of a tab of dialogue box of ckeditor using below code. CKEDITOR.on( 'dialogDefinition', function( ev ) { var dialogName = ev.data.name; var dialogDefinition = ev.data.definition; if ( dialogName == 'image' ) { dialogDefinition.addContents({ id : 'uploadTab', label : 'Upload', elements : [

afoysal's avatar
afoysal's avatar afoysal3yrs agoJavaScript
2
1
Last reply by afoysal 3yrs ago
Kris99's avatar

Upload/Picture form update images with deleting

Hey! I have a little bit problem. I hope someone can help me. I Upload images in Orchid Panel, and attach them a Model, it is working, but when I try to update images an exist Model like deleting, the image still is on storage, and after refresh it is appeared again. No error message in Console (like javascript), or from laravel. After upload I try to delete it in dropzone wit

Kris99's avatar
Kris99's avatar ZohaibAhme...3yrs agoLaravel
5
1
Last reply by ZohaibAhmed 3yrs ago
AdeMike's avatar

Laravel ImageKit.io error

I tried uploading my image to imageKit.io platform, it successfully upload but its a broken image and if you get the url , it always show 404. my code below $imageKit = new ImageKit( "public_URL", "private_URL", "image.io_URL" ); // For File Upload $uploadFile = $imageKit->uploadFile([

AdeMike's avatar
AdeMike's avatar Sinnbeck3yrs agoLaravel
5
1
Last reply by Sinnbeck 3yrs ago
devratna's avatar

livewire remove pic preview

i'm kinda new to livewire uploading i can't seem to find out a way to remove single image from the ones to upload. how can i remove a single image from preview? currently it looks like this https://prnt.sc/vcuz7k sorry for messy code <div class="mb-4 flex-row js box" x-data="{ droppedfiles: false, dropping: false, uploading: false, success: false }"

devratna's avatar
devratna's avatar devratna5yrs agoLivewire
0
1
tomasosho's avatar

Can someone help me out

I am trying to upload, crop then save my image to my database. The problem i have is the upload button is not wotking. and when i get it to work, it doesn't send data to the controller. <html> <head> <title>Test Test</title> <script src="{{asset('js/jquery.min.js')}}"></script> <script src="{{ass

tomasosho's avatar
tomasosho's avatar kkhicher16yrs agoGeneral
27
1
Last reply by kkhicher1 6yrs ago
R3N's avatar

https://github.com/spatie/image vs https://github.com/Intervention/image

Anyone had the experience of using both? currently planning to use either of them, yet having hard time choosing one since both look so good with high quality documentation. http://image.intervention.io/use/basics https://docs.spatie.be/image/v1/introduction/ As well using vue.js instead of blade currently. My goal is to make area where users can upload images for their page im

R3N's avatar
R3N's avatar R3N6yrs agoLaravel
0
1
Caracorn's avatar

LUMEN-API sending images as direct data (octet-stream) not possible?

Hello, I want to create an API in Lumen. With the API the users could upload images. After uploading a image, the API should forward this image to another external webservice by sending this picture as direct data (octet-stream) with appropriate MIME Content-Type header. How can I deal it with Lumen API? Is there maybe a out-of-the-box-feature for that in Lumen? Thank you very

Caracorn's avatar
Caracorn's avatar Caracorn6yrs agoLumen
2
1
Last reply by Caracorn 6yrs ago
MaTTo's avatar

Sending POST request catches error but no error occured

I have an application in production, which is used by multiple users - they always access the app from the mobile phone (in this case it's from Android 6.0.1 with Chrome Mobile 71.0.3578). Inside the app, they have to take a photo of specific thing and upload it. I created a Vue component with simple INPUT which on click launches Photo app or opens gallery to pick image. After

MaTTo's avatar
MaTTo's avatar MaTTo7yrs agoVue
0
1
jerauf's avatar

Getting preview img from embedded video

I've got a site that has videos embedded from many different sites. Right now, I need to manually take a screenshot and upload that as the preview image. I'm not uploading and encoding the videos, though. Only using embed code. Has anyone ever used Laravel to auto-generate a preview image from the video that's been embedded?

jerauf's avatar
jerauf's avatar rin4ik8yrs agoGeneral
2
1
Last reply by rin4ik 8yrs ago
mikestratton's avatar

Pass Value from JS Function to Blade View Form

I need to capture a screenshot from an HTML element and then upload that screenshot as an image file. I am using html2canvas to create a JavaScript function that will download the image with an onClick function. The capture screenshot function works to download "onClick". I need to pass the value of that function to the blade form (laravaelcollective/html). //Blade f

mikestratton's avatar
mikestratton's avatar mikestratt...8yrs agoJavaScript
0
1
mrestufp20's avatar

C:\xampp\tmp\phpCEC2.tmp (laravel) how to fix that ?

I can not send the file to the database, although it can be created but instead appears C: \ xampp \ tmp \ phpCEC2.tmp, and the file is not to send in my folder this my Controller namespace App\Http\Controllers; use Illuminate\Http\Request; use App\Project; use App\User; use App\Adpro; use Illuminate\Support\Facades\Input; use DB; use Validator; use Session; use Redirect; class

mrestufp20's avatar
mrestufp20's avatar mrestufp208yrs agoLaravel
0
2
bogdy's avatar

validation doesnt work for .jpg file

I try to validate a picture with this code. private $rules = [ 'image' => ['mimes:jpg, jpeg'] ]; It works for files with extensions .jpeg. but when I upload a .jpg file the image is not displayed. thanks in advance

bogdy's avatar
bogdy's avatar bogdy9yrs agoLaravel
2
1
Last reply by bogdy 9yrs ago
samalapsy's avatar

Upload Multiple Images to Server Using Image Intervention

public function saveImages(Request $request) { $images = $request->file('hostel_image_files'); $slug = session::get('new_hostel_slug'); $folderName = $slug; $listingPath = $folderName ."/"; $path = "uploads/listings/hostels/". $folderName ."/"; //File Does not Exist

samalapsy's avatar
samalapsy's avatar samalapsy8yrs agoLaravel
3
1
Last reply by samalapsy 8yrs ago
PANDISHARATHI's avatar

yarja data table image column export excel and csv

hi, i have doubt in using yarja datatable with table data upload the data and show thie image column fields with export excel show image. how to? need any one help.

PANDISHARATHI's avatar
PANDISHARATHI's avatar tisuchi1yr agoLaravel
1
1
Last reply by tisuchi 1yr ago
imx1997's avatar

A specific image not uploading using Intervention Image

Here is the link of image, which I am trying to upload it been redirect to me HTTP 500 and not working. Instead of throwing any error or exception. https://we.tl/t-TqCnOjXzRY Here is my code you can check. public static function fileUpload($file,$path,$thumb,$allowExtension){ try{ $extension = $file->extension(); $orgName = $file->getClie

imx1997's avatar
imx1997's avatar imx19971yr agoPHP
0
1
PetroGromovo's avatar

Why spatie/laravel-medialibrary raise error on uploding image uploaded with faker-images?

I added https://github.com/morawskim/faker-images to laravel 9 site and when I try get image from this lib and to upload it with Medialibrary $faker = \Faker\Factory::create(); $faker->addProvider(new \Mmo\Faker\PicsumProvider($faker)); $faker->addProvider(new \Mmo\Faker\LoremSpaceProvider($faker)); $pageUploadedImageFile= $faker->picsumUrl(400, 400); $imageMedia =

PetroGromovo's avatar
PetroGromovo's avatar SWIS3yrs agoLaravel
6
26
Last reply by SWIS 3yrs ago
Gabotronix's avatar

Error when uploading image with laravel and intervention package

Hi everybody, before storing a file on my laravel app I want to proccess the image with Intervention package, and then upload it to my public disc using method storeAs as always, however I'm getting the following error: Command (StoreAs) is not available for driver (Gd). My upload method: public function uploadAndProccess( $request, $name, $previousImage = false , $folder = 'u

Gabotronix's avatar
Gabotronix's avatar tykus4yrs agoGeneral
3
1
Last reply by tykus 4yrs ago
EbrahemSamer's avatar

SVG Image does not show in the website.

When I upload svg it shows as white image.. and when I inspect on it and open the link the image is correct but most of the image white image and the main logo at the top left at the top corner.... here is an example: https://www.azcoupon.it/azcoupon_core/storage/app/public/images/markets/dd3MtypakUzerPOcVenG7tWZhLbjQW7YhHShpFor.svg Any Ideas

EbrahemSamer's avatar
EbrahemSamer's avatar MohamedTam...4yrs agoLaravel
3
1
Last reply by MohamedTammam 4yrs ago
RootKing's avatar

Image Stored as .tmp file in database. [Laravel]

I am trying to upload my images in Laravel. The image files successfully get uploaded in the desired location but the filename in database is stored as C:\xampp\tmp\php1A3F.tmp. Code: if ($request->hasFile('image_url')) { $i = 0; foreach ($request->file('image_url') as $image_url) { $fileName = Str::slug($request->title). time()

RootKing's avatar
RootKing's avatar RootKing5yrs agoLaravel
0
1
redroseamit's avatar

how to create upload pdf file in controller using store method of resource controller.

public function store(Request $request) { $this->validate($request, [ 'name' => 'required', 'details' => 'required', 'image' => 'required|image|mimes:jpeg,png,jpg,pdf,doc,docx|max:2048', ]); /* how can i upload a pdf file and create do.wnload link in

redroseamit's avatar
redroseamit's avatar redroseami...5yrs agoLaravel
10
1
Last reply by redroseamit 5yrs ago
user_hkcl's avatar

Laravel Image Resize(Already Uploaded One)

Hi folks, I developed an application where i uploaded multiple images ,now i realise that i have to resize the image due to optimization issue.for further upload i have used intervention/image. How can i resize the image which are already uploaded ? Is there any way please suggest. Thanks :)

user_hkcl's avatar
user_hkcl's avatar user_hkcl5yrs agoLaravel
2
1
Last reply by user_hkcl 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.