For a new server with Web 8.1.1 and DXA 2.0 (.NET) and no modifications, on browsing webpages admins see that all content images have markup such as the below and hence images are not displaying successfully.

img src="/cid/scale/1024x311/LOCALHOST/media/ballon-burner_tcm6-315.jpg" alt="" data-aspect="3.3" width="100%"

Working backwards from the issue, it appears that the CID TBB might have been used to prepend content of the data-cid-rule attribute to the beginning of the src URL.

However, admin only did the DXA import and website deployment for basic setup, and did not customize DXA templates. I have confirmed this by inspecting the DXA homepage page template/article template/content page template TBBs and see just the default ones were used. Also the CID assembly was not visible when inspecting the Template Builder. Although too lengthy to add to question here, I also have the page markup and debug output when running the Article template through debug in Template Builder and can add extracts to the issue description if helpful.

Any thoughts on why the CID TBBs have erroneously changed the DXA content image URLs, and what might be done to correct this?

1 Answer 1


I don't think the DXA TBB's perform any logic to resolve urls of binaries. All this is usually done on the frontend, via the DXA framework.

The TBB's are only responsible for outputting the page and component data as json.

For your CID issue, I believe you can define this as a setting in your unity.config

  • make sure the mediahelper is set to this

    <type type="IMediaHelper" mapTo="BaseMediaHelper">
      <lifetime type="singleton" />
  • and check if in your web.config you are using the StaticContentModule instead of the ContextualImageProxyModule in the <modules> section

    <!-- This module can be enabled if you use the ContextualMediaHelper implemention. Refer to the IMediaHelper implementation mapping in your unity configuration. 
    <add name="ContextualImageProxyModule" type="Sdl.Web.Context.Image.Proxy.ContextualImageProxyModule" />
    <add name="DxaStaticContentModule" type="Sdl.Web.Mvc.Statics.StaticContentModule" />
  • For clarity: the ContextualImageProxyModule is part of CID and not an alternative for the DxaStaticContentModule ; if you’re using CID in DXA, you will need both. Aug 29, 2018 at 17:49
  • Many thanks, issue resolved after making suggested changes.
    – Terry Kim
    Aug 30, 2018 at 15:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.