Stand with Ukraine! How can you help?

Correct image cropping on OpenCart

Crop images without borders
  • Module version: 1.0.0
  • Last Update: 10/06/2021
  • Module format: ocmod.zip
  • Modification: yes
  • OpenCart: 2.x, 3.x
  • OcStore: 2.x, 3.x
  • PHP: 5.6 - 8.x
  • License: CC BY-ND 3.0
  • Author: OpenCartBot
  • Support: no

A simple free extension developed by opencartbot to fix image cropping issue in OpenCart. As we know, if images are uploaded to the site in different proportions, then when forming a thumbnail on the site, they will receive white borders at the edges. This is because the image is reduced to the same size on the long side, and the missing edges on the short side are filled with a white background.

Crop images in proportions

Our ocmod extension allows you to get rid of this problem, with its help images on the preview will be cropped to the specified size on the short side.

Module installation instructions:

  1. Upload the module in the admin panel in the "Extensions" : "Install".
  2. Go to the "Modifications" section and update the cache.
  3. Delete the contents of the /image/cache/ folder on the site to create new images in the cache.
  4. Check the display of images on the site, while you need to reset the browser cache.
  5. Bingo!


You must be logged in to view the files!

Write a review

Facebook Google
Note: HTML is not translated!
   Bad      Good

Валентин Сухов 04/12/2023

На ocstore 2.1:
$image_old и $image_new
нужно заменить на:
$old_image и $new_image.

dev 27/10/2023

на пхп 8+ белый экран

opencartbot 27/10/2023

PHP8 немає в підтримуваних версіях в описі модуля.

Viktor Keh 07/02/2023

Автору респект. Працює, але додавав код у потрібний файл. Через завантаження ocmod чомусь не запустився

mega zooma 23/11/2022

Автору велика вдяка за мод, допоміг мені вирішити своє питання! Слава Україні!

Андрей Рейс 18/11/2022

Шаблон Unishop 2, плагин не работает.

opencartbot 18/11/2022

Сумніваюся, що причина в нестандартному шаблоні. Може не видалили кеш зображень або очікували , що розширення має працювати якось по іншому. Зображення обрізається по заданих розмірах. Саме обрізається, а не розміщується на білому фоні у зменшеному вигляді, як це відбувається по дефолту.

live
support

Extension Compatibility

  • OpenCart: 2.0.x.x, 2.1.x.x, 2.2.x.x, 2.3.x.x, 3.0.0.0, 3.0.0.2, 3.0.1.0, 3.0.1.1, 3.0.1.2, 3.0.2.0, 3.0.3.0, 3.0.3.1, 3.0.3.2, 3.0.3.3, 3.0.3.4, 3.0.3.5, 3.0.3.6, 3.0.3.7, 3.0.3.8, 3.0.3.9,
Free!

More OpenCart Extensions

Change log for products

$15.00

Taxer VAT in checkout OpenCart

$20.00

Add free gifts to order

$20.00

Photo albums OpenCart

$20.00

Audio player on product page

$20.00

Products by Categories on Home page

$12.00

Get products by tags or by part of a tag

$10.00

Read Our Blog