Domanda

I have a problem with resizing images on upload to slider.
I want to disable this function, because the flexslider has large resolution(1500 x 500px) and the images aren't shown well.

Do you have an idea how to disable?

Thanks

È stato utile?

Soluzione 2

In the controller file of slider:

Change:

'image' => $this->model_tool_image->resize($result['image'], $setting['width'], $setting['height'])

to:

'image' => $result['image']

Altri suggerimenti

The correct way to do this would be to use the pre-defined constants along with the image path. For older versions of OpenCart, there was the HTTP_IMAGE or HTTPS_IMAGE constants depending on needing it to be secure or not, whereas in the newer versions you would just use HTTP_SERVER or HTTPS_SERVER. These ensure you have full paths to the images, not just relative images that could be incorrect especially with SEO keywords enabled.

So the correct method for the older versions would be

'image' => HTTP_IMAGE . $result['image'],

and later versions would be

'image' => HTTP_SERVER . 'image/' . $result['image'],

You can find out just which you need by looking in your config.php file. If HTTP_IMAGE is defined, use that, otherwise use the HTTP_SERVER example

Just login to the admin panel and go to Extension>Modules>Slideshow>Home Page(or may vary if you might have renamed it) click on the edit button and simply add the Width and Height.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top