I have a schema with a Rich Text Field that has embedded images. The source that the DWT renders looks like this:
<img src="tcm:84-40483" tridion:href="tcm:84-40483" tridion:type="Multimedia" tridion:targetattribute="src" border="0" alt="">
After Default Finish Actions does its magic, the tag turns into a regular image tag with a relative path in the src attribute, i.e. it bakes it like this:
<img src="/en/Images/myimage.jpg" />
I need to render an absolute image path for certain DCPs for a third party email campaign app to pick up.
I can certainly achieve this by writing a Image Link Resolver TBB that grabs the base path from the Publication's custom metadata and concatenates it with the relative URL that Tridion spits out.
I am wondering if it's possible to achieve this some other way, hopefully via configuration, similar to the configuration available in cd_link_conf.xml and cd_dynamic_conf.xml where you can specify the
host attribute. I fully understand that this config is on the CD side, while the image path is baked by the Publisher.
My question in two parts is:
- Is it possible, and if so how, to make the defalt Link Resolver TBB to render a dynamic binary link to an image (instead of a baked img) and then control URLs via the cd_link_conf.xml and cd_dynamic_conf.xml configs on the CD side?
- Or if 1 isn't possible, is using a custom link resolver TBB to make the image path absolute the best way (via concatenation), or are there other options available?