[Bug] Image field cannot be used with big sized image
See original GitHub issueBug report
What I did
I made a crud controller using image
field. Here’s the image field’s declaration:
CRUD::field('featured_image')
->type('image')
->label('Featured Image')
->crop(true)
->aspect_ratio(1.96)
->disk('public');
What I expected to happen
Image cropped and uploaded as usual
What happened
for some reason when I use images with big size or big resolution, it returns error 404 method not found for POST /admin/{entity}/{primary_key}
What I’ve already tried to fix it
- resize the image to small resolution (around 700-800px width) so backpack won’t return 404 error. (always works)
- convert the image to .jpg (sometimes still return 404 error, intermittent)
And also, this is error is not showing in my local machine. So this is either because of server error, connection (images took some time to upload to server, unlike in localhost), or the particular image problem
Backpack, Laravel, PHP, DB version
When I run php artisan backpack:version
the output is:
Local:
PHP VERSION:
PHP 7.4.5 (cli) (built: Apr 14 2020 16:17:34) ( ZTS Visual C++ 2017 x64 ) Copyright © The PHP Group Zend Engine v3.4.0, Copyright © Zend Technologies
LARAVEL VERSION:
v8.19.0@f5f331cee60f1bbe672503b7eb9ba5b22b2ceacb
BACKPACK VERSION:
4.1.30@62856b1f01fc3e05c80140fc22f85ea2aac8368c
Server:
PHP VERSION:
PHP 7.4.13 (cli) (built: Nov 25 2020 21:00:01) ( NTS ) Copyright © The PHP Group Zend Engine v3.4.0, Copyright © Zend Technologies with Zend OPcache v7.4.13, Copyright ©, by Zend Technologies
LARAVEL VERSION:
v8.19.0@f5f331cee60f1bbe672503b7eb9ba5b22b2ceacb
BACKPACK VERSION:
4.1.30@62856b1f01fc3e05c80140fc22f85ea2aac8368c
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (17 by maintainers)
Top GitHub Comments
@mahasadhu end up creating the PR, thinking about it twice, it may help some 😅 https://github.com/Laravel-Backpack/docs/pull/239
No problem @promatik 🤝 Yea it could be, since the
image
field send the image as base64 string (CMIIW).Understood, if you need me to update the issue title so it can be more easily searched, just tell me.
I’ve also tried to find how to disable those extensions programmatically, but so far no success 😅 I’ll post later if I got any ways to work around it.
Thank you!