As Chris mentioned, the addBinary
method (from the namespace: Tridion.ContentManager.Publishing.Rendering.RenderedItem
) is what you need, here's the options available:
- AddBinary(Component); AddBinary(Component, String);
- AddBinary(Component, StructureGroup);
- AddBinary(Component,StructureGroup, String);
- AddBinary(Stream, String, String, Component,String);
- AddBinary(Stream, String, StructureGroup, String, Component,String);
If you wish to publish to a specific location, you can supply a StructureGroup parameter to addBinary, the image will then be published into the directory related to the particular StructureGroup.