Storing assets
This article is meant to help you better understand storing assets in PaaS.
DX Cloud leverages the Digital Asset Management (DAM) module for managing assets such as images, videos, and documents. In some cases, you may have quite a lot of assets to manage.
By default, thumbnails are disabled to ensure optimal performance in DX Cloud.
Projects with a large volume of assets per folder can cause serious performance issues when thumbsnails are enabled.
If you wish to turn thumbnails back on, you can do so by setting thumbnails: true
in the dam.subApps.yaml
file.
We only recommend doing this if you have structured your assets in an optimal way to minimize any performance degradation.
How to handle many assets
The DAM can handle a very large number of assets. However, if you have more than 10,000 assets, you should organize them into folders. If the number of assets you have drastically exceeds the 10,000 guideline, we recommend that you use an external storage system with our External DAM integration framework, our DAM API, or one of our Incubator modules extensions.
As a rule of thumb when using JCR for assets, you should keep it to about 500 assets per folder. This is independent of the asset type. So, whether it’s an image, pdf, or some other type of asset, let’s try to keep it under 500.
-
Avoid storing too many assets in the same folder. Instead, create subfolders and organize your assets. Storing too many assets within the same folder may lead to performance issues.
How to handle large assets
We don’t recommend using publication for any assets above 2 GB. You should store anything of that size in an external DAM system and reference it from Magnolia.
Want to know more details about publishing assets?
When you publish an asset, it is fetched from the DB into the app server, converted from binary into a base64
encoded stream, and zipped for transfer.
Likewise, on the receiving end, it’s unzipped, decoded, and pushed from the app server to the DB.
Because of that, publishing huge assets is slow and resource-intensive for both author and public servers.