How to Manage Dynamic Media URLs in Magento 2?

4A Dynamic Media URLs is an address that direct user to an image or a media file. As a normal dynamic URL, a dynamic media URL may include a query string and is not very much friendly with SEO. If it is set as “enable” by admin, dynamic URL can bring the users directly to your data processor. It also can link them to files that are stored on a content delivery network. Dynamic Media URL in products and categories can help to improve catalog performance, resulting in a positive experience for your customers when they are shopping online.

Like other markup tags, a dynamic media URL code is covered in double curly braces. Here is a typical format of a dynamic media URL: {{media url=”path/to/image.jpg”}}

Configure Dynamic Media URLs

As mentioned, dynamic media URLs can be configured to be either “enable” or “disable” by an admin of the online store. Below are steps should be taken:

  1. Sign in with an admin account.
  2. Click Stores on the left panel, then choose Configuration under Settings.
  3. Expand Catalog and tap the Catalog element bellow it.
  4. Click the drop-down arrow on the right side of Storefront.

    Media URLs Storefront
    Media URLs Storefront
  5. Now set the Allow Dynamic Media URL in Products and Categories choice as your preference.Configure-Dynamic-media-URL
  1. Press Save Configuration to confirm your setting.

Configure Static Media URLs

Admin can also use static media URLs for catalog product and category descriptions.

  1. In the backend status, tap Stores.
  2. Choose Configuration under Settings.
  3. Expand General factor, then select Content Management. Here you will see WYSIWYG Options.
  4. Set Use Static URL for Media Content in WYSIWYG for Catalog to “Yes” if you want to use static URLs by default for media files and “No” otherwise.
  5. Click Save Configuration to save changes.

    Static Media URLs
    Static Media URLs

In short, with only a little effort, you can easily configure dynamic media URLs for your online store. It not only helps to better control catalog products and categories but also bring your customers finer shopping time.