You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created this in Laravel 7.4 and it mostly works, but when trying to seed the database with users it shows the following error:
getimagesize(): read of 8192 bytes failed with errno=21 Is a directory
If I die and dump $filepath just before the $getImageSize = getimagesize($filepath); I get the correct file path with the faker image shown at the end as a .jpg image:
"/home/vagrant/code/car_app/storage/app/public/user-images/2020/6/23/24541ee1986411e54cbcb0c8b80482a9.jpg"
Taking out the getimagesize() section and replacing with fixed data shows an error on the next call to $filepath which is '$img = Image::make($filepath)' and the error says 'Image source not readable'
I have tried replaced $filepath with the value of $filepath (storage_path('app' . DIRECTORY_SEPARATOR .
'public' . DIRECTORY_SEPARATOR .
config('project.user.images_folder') . DIRECTORY_SEPARATOR .
$date->year . DIRECTORY_SEPARATOR .
$date->month . DIRECTORY_SEPARATOR .
$date->day . DIRECTORY_SEPARATOR .
$main_image_name)) directly and then it shows the issue as being the $main_image_name part.
When I run the seeder it does create some images in the correct sub folder in storage and also creates the three sizes in the correct sub folders in public/uploads. Sometimes there is one image created and sometimes 2 or 3 but it gets no further than this.
Maybe this is a timeout issue?
The text was updated successfully, but these errors were encountered:
I have created this in Laravel 7.4 and it mostly works, but when trying to seed the database with users it shows the following error:
getimagesize(): read of 8192 bytes failed with errno=21 Is a directory
If I die and dump $filepath just before the $getImageSize = getimagesize($filepath); I get the correct file path with the faker image shown at the end as a .jpg image:
"/home/vagrant/code/car_app/storage/app/public/user-images/2020/6/23/24541ee1986411e54cbcb0c8b80482a9.jpg"
Taking out the getimagesize() section and replacing with fixed data shows an error on the next call to $filepath which is '$img = Image::make($filepath)' and the error says 'Image source not readable'
I have tried replaced $filepath with the value of $filepath (storage_path('app' . DIRECTORY_SEPARATOR .
'public' . DIRECTORY_SEPARATOR .
config('project.user.images_folder') . DIRECTORY_SEPARATOR .
$date->year . DIRECTORY_SEPARATOR .
$date->month . DIRECTORY_SEPARATOR .
$date->day . DIRECTORY_SEPARATOR .
$main_image_name)) directly and then it shows the issue as being the $main_image_name part.
When I run the seeder it does create some images in the correct sub folder in storage and also creates the three sizes in the correct sub folders in public/uploads. Sometimes there is one image created and sometimes 2 or 3 but it gets no further than this.
Maybe this is a timeout issue?
The text was updated successfully, but these errors were encountered: