D
D
dgallyamshin2021-02-03 17:27:09
Twig
dgallyamshin, 2021-02-03 17:27:09

How to remove category image resize on OpenCart?

if ($_category['homethumb_image']) {
          $homethumb_image = $this->model_tool_image->resize($_category['homethumb_image'], $setting['width'], $setting['height']);
        } else {
          $homethumb_image = $this->model_tool_image->resize('placeholder.png', $setting['width'], $setting['height']);
        }

How to remove resize in $homethumb_image? I want the image to be with the initial width and height

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman, 2021-06-14
@romanchayka

I would do so

The code
if ($_category['homethumb_image']) {
$homethumb_image = '/image/' . $_category['homethumb_image'];
} else {
$homethumb_image = '/image/' . 'placeholder.png';
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question