Magento for B2B Commerce

Dynamic Media URLs

A dynamic media URLUniform Resource Locator: The unique address of a page on the internet. is a relative reference to an image or other media asset. When enabled, dynamic media URLs can be used to link directly to assets on your server, or to files stored on a content delivery network. The use of dynamic media URLs can impact catalog performance, and the editor can be configured to use either static or dynamic media URLs.

As with all markup tags, the directive is enclosed in double curly braces. The format of a dynamic media URL looks like this:

  • {{media url="path/to/image.jpg"}}

Dynamic URL directives are processed from saved HTMLHyperText Markup Language: A standard for tagging and structuring text, images, videos, and other media on a web page. content when the page is rendered on the storefront. Each time the page is rendered, the content is scanned for {{media url="..."}}, and replaces the directive with the corresponding media URL.

Inserting many directives, especially widgets like the Recently Viewed / Compared Products type, can produce a negative effect on the first page load when the page is not cached. For this reason, we advise that you use them with caution. In most cases, it should not create an issue. But this is something that you should discuss with your development team.