This brief tutorial will show you how to manage dimensions in OpenCart 2.3.x+ templates.
You may need to change the original size, if you download the product images, but they are displayed with the annoying white borders on pages with a single product or list of products.
This happens if the ratio of images you are uploading does not correspond to the ratio of the respective dimensions set in your theme settings.
To fix this issue, you should either resize your original product images with a graphics editor or change the predefined images’ dimensions in the website settings so that they have the same aspect ratio as your original images do.
The latter is very simple to do.
- Open your OpenCart dashboard and navigate to the Extensions ⇒ Extensions ⇒ Themes ⇒ Edit theme section.
You’ll find all the predefined image sizes there.
- After you change the dimensions for the necessary section, save the changes and check your website.
- OpenCart should automatically resize your image to the desired dimensions.If you do not see any changes, try to reload the image from the control panel, so that it certainly has changed again.
That’s pretty it. Now you know how to manage images dimensions in OpenCart 2.3.x+.