Recent Topics

Error with images cache after system migration

  • Introduction:

    Hi, I had a bagisto system installed and running over an AWS instance with ubuntu 18.04 and apache2. Recently I had to move the system to production. So I copied all the app's files to anothe AWS instance. This production instance is with nginx instead of Apache, but still ubuntu 16.04

    Main Problem:

    After the deploy all the images of products in the store has been broken. In the admin panel I can access the images and in database there's data in product_images table with the product id and the path to the image.

    The main problem is with the cache route when images are resized. I tried deleting and uploading again a product's image, but the problem persiste. When I try to access an image url in the browser it returns 404.

    I don't know which might be the problem. I've tried reaching the images to render generating the url by my self and it works just fine. But when using \Webkul\Product\Helpers\ProductImage all url's are broken.

    Environment Specs:

    PHP: 7.1.33
    Server: Nginx 1.14.0

    Working Examples:



    Not Working Examples:




    Any help is usefull. I haven't made any modification to the core.


  • Hi, @Vaishali-Agarwal

    I tried the solution, but problem still persists.

    The original symlink was made manually, but i tried unlink storage and then php artisan storage:link. Additionally I changed the .env file from:




    Nothing changed.

    I cleared all these cache:

    php artisan route:clear;
    php artisan cache:clear;
    php artisan config:clear;
    php artisan view:clear;

    But images routes similars to:[size]/product/[id]/[image].jpeg still returning 404 error.

    The error does not occurs with images with routes like:[id]/[image].jpeg. That's why I think the link you suggested does not solve the issue. The problem is not with the storage, but with the /cache/ route.


  • @n00best said in Error with images cache after system migration:

    php artisan cache:clear;

    As we checked, there is an issue with your cache so once run the command in order as

    1. php artisan config:clear
    2. php artisan config:cache
    3. composer dump-autoload

    Please let us know, if your issue still exist..