marketplacekit / marketplacekit

A platform to create an online marketplace
https://marketplacekit.com
GNU General Public License v3.0
752 stars 330 forks source link

Unable to upload image #56

Open timeholes opened 5 years ago

timeholes commented 5 years ago

Unable to load images for any listings, this is the error message:

2018-12-09 13 45 30

I added writing permissions for user 'www-data' to storage folder on my server, but that didn't help. Any idea what may cause this error?

dariopetraroia commented 5 years ago

I have the same issue

dariopetraroia commented 5 years ago

I fixed this by changing the Image Driver from imagick to gd in: config/image.php

timeholes commented 5 years ago

@dariopetraroia Did you just changed the config and it worked? I did edit image.php, then sudo apt-get install php7.2-gd sudo service nginx restart but the problem is still there.

niteshn99 commented 5 years ago

I had the same problem. It exploring I found that laravel sandbox dosen't have Imagemagick. Thus, installing Imagemagick solved the problem. Use sudo apt-get install imagemagick php-imagick and then restart your laravel dev server.

niteshn99 commented 5 years ago

After deploying my project to nginx server, I am too experiencing same problem.

dariopetraroia commented 5 years ago

@timeholes first i tried to install imagick but this didn't solve the problem then i changed the image.php to gd library and it was working.

niteshn99 commented 5 years ago

In my case, after migrating from laravel dev server to nginx, I experienced the same problem. To solve this, I installed imagemagick and php-imagick. In addition, I also added extension=imagick.so in php.ini. After this I rebooted my server. Now images are getting uploaded and also getting displayed on listing.

eogunjirin commented 5 years ago

@niteshn99 Sorry do you experience upload size limit, the issue i have is that i can't upload images over 1.9MB, do you know what could be the cause, Thanks

ravee23 commented 5 years ago

I tried the solution of changing from imagemagic to gd. One problem of upload solved but the image is not showing up. May be something to do with image extension defining ....

Also, noticed the image file name is changing to photo_1.jpg, photo_2.jpg etc... after saving the listing and the image looks garbled too...

niteshn99 commented 5 years ago

@EmmaTheGr8est Sorry but I haven't used any listing image of that much size.