• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

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

problem with image resizings

Bug Report
6
13
3.4k
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.
  • M
    mdm last edited by 3 Aug 2019, 06:21

    hello
    when i upload a product image in bagisto, the size ratio of medium image url is not same as the original image.for example if my picture is 400 X 400 px the medium image size is 280X200 px. how can i fix this probelm

    1 Reply Last reply Reply Quote 1
    • S
      shreyasi last edited by shreyasi 3 Aug 2019, 06:42 3 Aug 2019, 06:36

      same issue with me too..
      I have uploaded product image in size 600x600 but it shows the size 250 x 350.
      so that image gets stretched.
      please do the needful its urgent.

      1 Reply Last reply Reply Quote 1
      • R
        RK REZA last edited by 3 Aug 2019, 10:24

        I have the same problem.

        1 Reply Last reply Reply Quote 0
        • R
          rahul last edited by 7 Aug 2019, 07:17

          Hi @RK-REZA @shreyasi @mdm

          Open Medium.php file in CacheFilters folder of Product package & change dimension accordingly.

          public function applyFilter(Image $image)
          {
              return $image->resize(280, 350);
          }
          

          Thanks

          S 1 Reply Last reply 7 Aug 2019, 09:09 Reply Quote 0
          • ghermans
            ghermans last edited by 7 Aug 2019, 08:13

            @rahul wouldn't it be more user-friendly to add a option in the admin panel to change these values?

            Kind regards,
            Glenn Hermans

            Manager Bagisto Europe
            info@bagisto.eu

            1 Reply Last reply Reply Quote 0
            • R
              rahul last edited by rahul 7 Aug 2019, 08:16 7 Aug 2019, 08:15

              Hi @ghermans

              Sure !!! We will implement it.

              1 Reply Last reply Reply Quote 1
              • S
                shreyasi @rahul last edited by 7 Aug 2019, 09:09

                @rahul said in problem with image resizings:

                change dimension accordin

                Hi @rahul ,
                I changed in medium.php but it won't work. still, 280 x 350 dimension is taken in the product image.
                should I change it into CSS?
                if yes please provide the class name and file were to change the CSS.

                1 Reply Last reply Reply Quote 0
                • R
                  rahul last edited by 7 Aug 2019, 09:18

                  Hi @shreyasi

                  Run following command after changing dimension -

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

                  and clear your browser's cache. (Cached Images )

                  Thanks

                  1 Reply Last reply Reply Quote 0
                  • S
                    shreyasi last edited by 7 Aug 2019, 09:29

                    @rahul said in problem with image resizings:

                    composer dump-autoload

                    Hello @rahul ,
                    I followed all your steps but it won't change the dimension.
                    it takes default 280 x 350 pixel

                    1 Reply Last reply Reply Quote 0
                    • R
                      rahul last edited by 8 Aug 2019, 06:22

                      Hi @shreyasi

                      Please run 'php artisan cache:clear' also then check.

                      Thanks

                      1 Reply Last reply Reply Quote 2
                      • S
                        shreyasi last edited by 9 Aug 2019, 05:27

                        Hi @rahul ,
                        Yes, It works.
                        Thank you...

                        1 Reply Last reply Reply Quote 0
                        • 2 months later
                        • A
                          andrewc last edited by 4 Oct 2019, 06:46

                          If we are making code changes, how will we update Bagisto when a new release comes out?

                          ghermans 1 Reply Last reply 4 Oct 2019, 07:00 Reply Quote 0
                          • ghermans
                            ghermans @andrewc last edited by 4 Oct 2019, 07:00

                            @andrewc don't make changes to the core files, instead create a custom package
                            more info can be found here

                            https://devdocs.bagisto.com/create_package.html#how-to-create-package
                            or https://forums.bagisto.com/topic/221/how-to-override-view-file-in-bagisto

                            Kind regards,
                            Glenn Hermans

                            Manager Bagisto Europe
                            info@bagisto.eu

                            1 Reply Last reply Reply Quote 0
                            10 out of 13
                            • First post
                              10/13
                              Last post