Bagisto Forum

    Bagisto

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups

    back-end is ok,but front-end ,the image is broken

    Bug Report
    4
    4
    332
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 1
      15913132323 last edited by

      My Steps:
      cd /workdir
      composer create-project bagisto/bagisto mywebtmp
      mv all the files in the mywebtmp to /workdir/myweb
      cd /workdir/myweb
      I only changed the database's info in the .env
      php artisan install
      I use a local domain to the /workdir/myweb/public, the domain is http://test.bagisto
      Finished!
      Then, http://test.bagisto can open, http://test.bagisto/admin also can open. but only no image front-end and back-end.

      so I do next:
      cd /workdir/myweb
      rm public/storage
      php artisan storage:link
      Then vim .env APP_URL=http://test.bagisto
      Then
      php artisan cache:clear
      php artisan view:clear
      php artisan route:clear
      php artisan clear-compiled
      php artisan config:cache
      composer dump-autoload
      php artisan vendor:publish
      It is all successed.

      The when I upload image jpg back-end, and when I edit the produce to see the image, it is there.
      http://test.bagisto/storage/product/30/glRwTsK5ITBnJyRa7hyjGL6D2K606Ds4qA1hqnZc.jpg
      and
      ls /workdir/myweb/public/storage/product/productid/
      also can see the jpg , so the back-end is ok.

      but I cannot find the /workdir/myweb/public/cache , no this dir.
      http://test.bagisto/cache/small/product/30/glRwTsK5ITBnJyRa7hyjGL6D2K606Ds4qA1hqnZc.jpg
      also it is broken.
      how to fix this? thanks.

      K 1 Reply Last reply Reply Quote 0
      • devansh-webkul
        devansh-webkul last edited by

        This is because we are using the intervention package, and the image will not get if you have not installed GD extension,
        https://devdocs.bagisto.com/1.x/introduction/requirements.html#php-extensions

        1 Reply Last reply Reply Quote 0
        • K
          kenaanna @15913132323 last edited by

          @15913132323 said in back-end is ok,but front-end ,the image is broken:

          My Steps:
          cd /workdir
          composer create-project bagisto/bagisto mywebtmp
          mv all the files in the mywebtmp to /workdir/myweb
          cd /workdir/myweb
          I only changed the database's info in the .env
          php artisan install
          I use a local domain to the /workdir/myweb/public, the domain is http://test.bagisto
          Finished!
          Then, http://test.bagisto can open, http://test.bagisto/admin also can open. but only no image front-end and back-end.

          so I do next:
          cd /workdir/myweb
          rm public/storage
          php artisan storage:link
          Then vim .env APP_URL=http://test.bagisto
          Then
          php artisan cache:clear
          php artisan view:clear
          php artisan route:clear
          php artisan clear-compiled
          php artisan config:cache
          composer dump-autoload
          php artisan vendor:publish
          It is all successed.

          The when I upload image jpg back-end, and when I edit the produce to see the image, it is there.
          http://test.bagisto/storage/product/30/glRwTsK5ITBnJyRa7hyjGL6D2K606Ds4qA1hqnZc.jpg
          and
          ls /workdir/myweb/public/storage/product/productid/
          also can see the jpg , so the back-end is ok.

          but I cannot find the /workdir/myweb/public/cache , no this dir.
          http://test.bagisto/cache/small/product/30/glRwTsK5ITBnJyRa7hyjGL6D2K606Ds4qA1hqnZc.jpg rice purity test
          also it is broken.
          how to fix this? thanks.
          The issue seems to be with image caching in your Bagisto project. Ensure the storage:link command was executed correctly, file permissions are set properly, and the image processing package is configured correctly. Try clearing the cache and running php artisan bagisto:image:generate to force the cached images to be generated.

          1 Reply Last reply Reply Quote 0
          • Rishabh-Webkul
            Rishabh-Webkul last edited by

            Hello @kenaanna

            Make sure the following extensions are installed and enabled. You can check using the phpinfo() page or the php -m command.

            php-intl extension

            php-gd extension

            NOTE- You must install the php-gd extension properly otherwise, the image does not work properly in the project.

            Thanks & Regards..!!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post