Product images are crucial for selling your products online. Managing these images can be done in several ways. Go to the setup card (Administration > Setup) and you will see that there are 3 different options for storing your Media.
Database, External and Azure Storage - File Share.
Database (Smaller Catalogs)
Database is the standard and most used option for smaller catalogs. This means that images will be stored in the Business Central SQL database (BLOBs). This is the default Media Storage Type and does not require any configuration. You can find this setting by going to Administration > Setup and scroll down to the Media section.
If you don't have a significant catalog we do not recommend to change this setting.
For example if you have 1.000 items with 2 images each, where the average image size is 250 Kilobytes.
Then the sum is:
1.000 x 2 x 250 Kilobytes = 500.000 Kilobytes = 500 Megabyte
This will be no problem for your Business Central database and won't cause any performance issues.
A standard Business Central SaaS SQL database is 80 Gigabytes by default.
When working with the Database option for images, you can simply drag and drop images on to the blue plus sign on the item card and they will automatically be uploaded. First into the Business Central SQL database, and as a next step they will be synchronized with Magento as well. You will notice that the Storage Type displayed in the Image Line will show ''Database''
Please note that you are able to drag and drop multiple images at a time.
Pro's of using database storage:
- Using this type of storage requires no additional configuration, and your images are automatically saved in the Business Central backup.
Con's of using database storage:
- When your catalog gets bigger or if you have a large amount of images per item, your database will grow, which may result in performance issues in the long term. However we have functionality to easily migrate to Azure Storage at a later point in time.
External (Larger Catalogs)
For larger catalogs, where you do not want to store the images in the database, we also have the option to use External Storage. Use this in case you want to work with extenal URLs. In this case images can be hosted on a Content Delivery Network (CDN) or any other type of publicly accessible external location.
In order to configure this navigate to Administration > Setup and scroll down to the media section. Select the Media Storage Type ''External''.
An example situation in which you might want to consider using an External Storage or an Azure Storage is provided below.
If you have 50.000 items which all have 10 images that are 1 Megabyte each. Then storage calculation looks like this:
50.000 x 10 x 1 Megabyte = 500.000 Megabyte = 500 Gigabyte
For these scenario's you want to look at the other options, External and Azure Storage - File Share because this amount of data stored in your Business Central database will cause performance issues.
External means that you will be working with external URL's. This means that your product images can be stored anywhere on the internet or in an online storage (e.g. CDN) which is publicly accessible. Once you switch to using external URL's, you cannot drag and drop files anymore. Instead the External Content URL field will become visible when you navigate to Content > Images. This field can be used to either enter data manually, or you can use BC Configuration Packages (Excel imports) to quickly import many image at once. The manual process is explained below.
When you are on your Magento Item Card in Business Central and navigate to Content > Images you will be able to add your external content URL of the image you want to add to the Magento Item.
Click ''New'' and paste your External Content URL in the column External Content URL and press the tab button on your keyboard. Now you will see that a new media record is created.
When you go back to your Magento Item you will see that a second media record is displayed with the storage type External.
Please note that if the external URL changes without manually updating the URL in Business Central, the image is not accessible anymore and will not be shown!
Pro's of Using External Storage:
- If you have a publicly accessible storage with permanent URL's this is a very quick and easy way to get your images in your Magento store.
- You don't save your images in the Business Central database which prevents performance issues due to image storage.
Con's of Using External Storage:
- If an image URL changes the image URL will not automatically change and therefore the product will not have an image anymore.
- The images are not automatically saved in a Business Central backup.
Azure Storage - File Share (Larger Catalogs)
When you have a large catalog you are most likely to use our most advanced functionality for storing your images which is using an Azure Storage - File Share. Using this option enables you to use the Drag & Drop functionality on the Magento Item Card within Business Central and still store the image on your Azure Storage - File Share.
In order to work with the Azure Storage - File Share functionality go to Administration > Setup and scroll down until you see the Media section. In the field Media Storage Type select ''Azure Storage - File Share''.
If you want to work this way, ask your IT department or IT partner to set up an Azure Storage - File Share and let them provide you with the Storage Account, File Share Name and SAS Token.
When using Azure Storage - File Share you will indirectly also use the External Content URL field, but then in a different way. The Azure Storage is secure and not publicly available, therefore you need the credentials to acces.
Once this is in place, you can enter the authentication credentials for this File Share on the Setup Card. And then you can synchronize the contents of the file share location with Business Central. This can be done by clicking Actions > Sync Azure Storage Images in the Setup.
When working with an Azure Storage you are able to use the Drag & Drop functionality on the Magento Item Card in Business Central. The image will be directly saved on your Azure Storage, therefore the storage type will immediately show Azure Storage - File Share.
Pro's of Using an Azure Storage - File Share:
- If you have an Azure Storage you can save your image in an external and secure database.
- You don't save your images in the Business Central database which prevents performance issues due to image storage.
Con's of Using Azure Storage - File Share:
- The images are not automatically saved in a Business Central backup and you are responsible yourself to backup the Azure Storage.
Migrating Images to an Azure Storage
As described before Commerce 365 has the ability to migrate images stored in your database to your Azure Storage. This can be done for all images at once by navigating to Administration > Setup > Actions and clicking on Migrate Media.
This action wil show you the dialog shown below, make sure that your current storage is Database and you want to Migrate to Azure Storage - File Share. If the selection is right, click ''OK'' and your images will be synchronized to Azure. This is as simple as it gets!
If you want to migrate a single image to your Azure storage know that this is also possible from your Magento Item Card within Business Central. Make sure your Azure Storage - File Share is set up and navigate to Content > Images, select one images and click ''Migrate''.
You will get the same dialog as when migrating all images from the setup card. Make sure that your current storage is Database and you want to Migrate to Azure Storage - File Share.
And as a result you will see that within a couple of milliseconds the storage type switches to Azure Storage - File Share.
Azure Storage - Setup Information for IT Department / IT Partner
Setting up an Azure File Share
When setting up an Azure File share, please follow the latest instructions provided by Microsoft. These can be found on this page.
Managing Images from a local drive
One of the advantages of using Azure Storage - File Share, is that you can easily create a virtual local drive that allows you to manage images as if you are working directly on a local computer. In order to set this up correctly we recommend to follow the latest instructions provided by Microsoft. These instructions can be found on this page.
Once you have executed the setup to map the File Share to a local drive, you can manage your images like in the screenshot below.
When working with Azure File Share, make sure that you always create a folder per item number.
If the folder name and item number do not match the system will not be able to import the images!
Once you are ready adding new files, click the import button on the Setup page again.