Laravel /Docker /Spatie Media Library -- Could not load image at path
Hi guys i have an issue with the deployment related to spatie media library package
i dockorized the app and spined the container in aws ec2
it works fine but the image upload is throwing this err
Could not load image at path
/usr/src/app/storage/media-library/temp/TbOvHHHaULQPYqnuOdXT7nlj4kpyzoUp/UAT5X2Agm6EQWbkYZcxEaWLGYMEfviu0thumbnail.jpg
i thought it was an permission issue in the docker container
i added those lines to my docker file
RUN mkdir -p /usr/src/app/storage/media-library/temp
RUN chmod -R 775 /usr/src/app/storage/media-library/temp
RUN chown -R www-data:www-data /usr/src/app/storage/media-library/temp
I faced the same issue and what solved it was that I changed the cpanel php current version from 8.3 to 8.2 ( and activated imagick extention because it got disabled after the switch) which what my project was using originaly.