Where and how images are stored

All product image files, categories and manufacturers in OpenCart are located in the directory /image/catalog, that is, the files are not physically stored in the MySQL database, and on the hard drive, relative paths to image files are stored in MySQL database

In older versions of OpenCart, the image directory was called /image/data, since OpenCart it is called /image/catalog

The full path of the main directory with images is written in the file config.php directive DIR_IMAGE, eg

define('DIR_IMAGE', '/home/user/www/domain.com/public-html/image/');

for instance, if the full path to the image file is like this:


Then the relative path will be stored in the MySQL database in the form:

All images and directories, inside /image/catalog, available for manager image, which is used for imaging when editing product, category, etc..

OpenCart has its own image processing tool. Before using the image in the product catalog, first a copy of the original image will be made in the directory /image/cache and then this copy of the image will be used in the catalog for products or categories or manufacturers.

All product images, categories and manufacturers are taken from the directory /image/cache and never use the original images of a directory /image/catalog.

OpenCart stores one main product image in the table oc_product, and all additional images in the table oc_product_image.

Name of csv fields

Expanding CSV Price Pro import / export to import and export images using field _IMAGE_, _IMGES_ and _PRODUCT_IMAGES_.

_IMAGE_ – for import and export of the main product image, category or manufacturer.

field recording EXAMPLE _IMAGE_:


_IMGES_ – to import and export goods only additional image as an image through a comma-separated list.

field recording EXAMPLE _IMAGES_:


_PRODUCT_IMAGES_ – to import and export all product images as images through a comma-separated list, where the first image is always the main image, This and all subsequent additional.

field recording EXAMPLE _PRODUCT_IMAGES_ :


resuming images

For, that would download image link (url), you need to enable the setting Download images by URL.

In the fields _IMAGE_, _IMGES_ and _PRODUCT_IMAGES_ instead of a relative path should be a reference (url) image, which are downloaded and placed in the directory image/catalog/

field recording EXAMPLE _PRODUCT_IMAGES_ :

http://www.demo.com/img/product/product-main.jpg, http://www.demo.com/img/product/product-add-1.jpg, http://www.demo.com/img/product/product-add-2.jpg

Modes images resuming

This setting is on the tab General> Basic Settings


The images will be downloaded and stored in the automatic mode, Directory and image names are created extension CSV Price Pro import / export on its own algorithm.


The names of the images and folders (way) possible will be preserved in their original form as they are written in exile (url) image.

For example, if it is a reference:

In mirror mode, the image will be downloaded in:

Prefix for image path

Prefix adds the specified part to the top of the image name.

Prefix is ​​used if you have a CSV file name of the image is written without a relative path, that is just one file name, Then when you import it to be added to the prefix and the resulting name will be saved in the database OpenCart.

For example, if you have the image saved as file names without paths, you can add a prefix catalog/custom_directory/ the result will be as follows:


Prefix for image path – never used, when image resume is on.

Start directory

This is a directory relative to the main directory DIR_IMAGE, which will be created for importing images into it when downloading images in automatic mode.

Export images as links (URL)

When you export, you can choose the setting in which the field _IMAGE_, _IMGES_ and _PRODUCT_IMAGES_ contain links (url) image, this is required if you want to download images from OpenCart or create a price list with links to images.

To re-import to use this export file is not necessary, because it does not make sense to download from your OpenCart and again to place the image in the same place.