M
M
Messi2015-09-17 22:00:15
opencart
Messi, 2015-09-17 22:00:15

How to remove the addition of white margins on the photo in the product card?

Hey! Please tell me, when I add an image to a product, OpenCart itself adds a white background on the sides, how can I turn it off or at least make it transparent?
OpenCart 2.0.3.1

Answer the question

In order to leave comments, you need to log in

5 answer(s)
K
Konstantin, 2015-09-24
@KoNnY

This cms will resize images according to the dimensions specified in the settings (Settings > Edit > Images tab). To have a transparent background instead of white stripes, upload a photo in .png format

D
deathsoul, 2016-04-28
@deathsoul

The same trouble, I suppose the question is not what is in the background, but how to make crop work instead of resize.

W
web_mas, 2017-08-17
@web_mas

I found a working solution for OpenCart 2.3 - https://opencartforum.com/topic/19493-adaptivnyy-r...
The solution for lower versions is also there, respectively.

D
dienelesida, 2021-04-04
@dienelesida

system->library->image.php
after
$new_width = (int)($this->width * $scale);
$new_height = (int)($this->height * $scale);
insert
$width = $new_width;
$height = $new_height;

K
kiarent, 2021-08-03
@kiarent

How to remove white stripes on a product photo in Opencart
https://softko.net/blog-post/kak-udalit-belye-polo...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question