Embeddable Asset

When asset embedding is enabled you can create embeddable code for your assets which allows you to display them on other web pages. Once the embed version of the asset has been created you will be given the embed code which can be inserted into any HTML page to display the asset on that page.

Please be aware that if you delete the original asset file from your Asset Bank then any embeddable versions you may have created will also be deleted from the system.

To enable it you will need to

  1. Enable the following setting in your ApplicationSettings.properties file:

    # Is asset file repurposing (AKA embedding) enabled?
    asset-repurposing-enabled=true

    Once you have changed the setting to 'true' you will need to restart the web application for the setting to take effect.

  2. Add a new "File System" or "Amazon S3" Storage Device for Embedded Assets

    1. "File System": add a new device and set it to be used for "Embedded Assets"


      Choose where to store the embedded files.
      Note, if the path does not start with a slash or drive letter, it is assumed to be relative to the application path (i.e. inside your Asset Bank webapp folder)


      Insert the URL that will be serving the embedded images


    2. "Amazon S3": add a new device and set it to be used for "Embedded Assets"


      Continue setting it up as regular storage device following the help page.

      Note, you will not need to set any special permission on the S3 bucket, Asset Bank will make an embedded asset publicly accessible when creating its embeddable code.

Using the default location for "File System" device type

Alternatively you can use Asset Bank to serve your embedded images
by setting "images/assets" in the Local Path

and set an empty Http Base Url in order to use your application URL

Please review the default location and method for serving these embedded assets as these have limitations.

Versioning

Note, if you re-upload a new asset (e.g. to create an updated version of the original) then this new version will now be shown in the sites you have embedded the asset in.

Permissions

This functionality can be used by Admin users and user Groups which have 'Users can embed assets' option enabled and 'Download' permissions on the asset to embed.
Once an user has permission to embed an asset then an "embed" link is visible on the asset page.

Other settings

Asset Bank can create an embedded version of an image, file, video and audio assets. To change how this embedded versions get created you will need to edit the following setting in ApplicationSetting.properties file

  • Image assets:
    max-image-repurpose-dimension: maximum width or height dimension of a repurposed image
    default-repurposed-image-max-width: maximum width of the default repurposed image
    default-repurposed-image-max-height: maximum height of the default repurposed image
    default-repurposed-image-extension: format (i.e. extension) of the default repurposed image
  • Video assets:
    repurposed-video-maintain-preview: whether repurposed videos should maintain the selected preview image that the asset has at the time of the repurposed versions creation
    repurposed-video-preview-max-height: maximum height of the video preview on the repurposed/embedded video page.

Was this article helpful?

Yes No

Thanks for your feedback!