Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Patrick4502's avatar

In Laravel Jetstream I cant upload a picture >2MB

I have a issue without answer. I created a new Laravel project with Jetstream and livewire stack. I dont make any modification, its fresh I just want to upload a photo profile and it work with any file less than 2mb, but not beyond it. My php.ini is well configurated with post_max_size, upload_max_filesize at 100M and 80M. My UpdateUserProfileInformation.php in app/Actions/Fortify is well configured with "'photo' => ['nullable', 'mimes:jpg,jpeg,png', 'max:10240']," It seems that a photo>2MB is directly reject when I load it with a red message "The photo failed to upload." without even be sending. I think the problem come from the input field in the update-information-form.blade.php line 41 "", maybe they are something wrong with the function "$refs.photo.click()". Do you have a solution for it? I will help me and other Laravel Jetstream user.

I try to upload a profile picture in laravel jetstream but it work only with file sized less than 2MB

0 likes
3 replies
JussiMannisto's avatar
Level 50

It doesn't sound like you have the correct PHP configuration. How are you running PHP? If you use PHP-FPM, you need to reload the service to get the updated configuration.

Add the route below and open it in your browser. It prints out your PHP configuration. Look for the post_max_size & upload_max_filesize variables and see what they say.

Route::get('/get-config', function() {
	phpinfo();
});

As for the code questions: if you want comments, post your code and format it into blocks with backticks as described here.

1 like
Snapey's avatar

Take a gaze into the Livewire config file

Patrick4502's avatar

Hi, thanks you JussiMannisto, I find that I dont configured my PHP install where they are a php.ini on the install folder, so you have to configure the php on your install and on the apache server.

Please or to participate in this conversation.