Skip to main content
2 of 3
added descriptions for fields
Bart Koopman
  • 29.6k
  • 3
  • 40
  • 90

The Image Resizer TBB should have a Parameters Schema set, this Schema has 4 fields

  • Width - (defaults to 100) An integer that specifies the desired width of the resized image
  • Height - (defaults to 100) An integer that specifies the desired height of the resized image
  • Percentage - If set to a value, specifies that the images should be resized to N percent of their original sizes, where N is the value specified. For example, the value 200 causes the images to be doubled in size, while the value 25 causes them to be reduced to one quarter of their original size. If this parameter is set, the Width and Height parameters must be empty.
  • ItemName - If set to a value, only the image with this item name in the package is resized; all other images in the input package retain their original sizes. By default, all recognized images are resized.

If you are missing that, you should be able to create it based on the following source, and attach that to your TBB so you can specify what you need in the Template Builder:

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="uuid:1D7B0405-BE6C-4DC3-8B6D-36D52C41EA8F" xmlns:tcmi="http://www.tridion.com/ContentManager/5.0/Instance" elementFormDefault="qualified" targetNamespace="uuid:1D7B0405-BE6C-4DC3-8B6D-36D52C41EA8F">
  <xsd:import namespace="http://www.tridion.com/ContentManager/5.0/Instance" schemaLocation="cm_xml_inst.xsd"></xsd:import>
  <xsd:annotation>
    <xsd:appinfo>
      <tcm:Labels xmlns:tcm="http://www.tridion.com/ContentManager/5.0">
        <tcm:Label ElementName="Width" Metadata="false">Resize width</tcm:Label>
        <tcm:Label ElementName="Height" Metadata="false">Resize height</tcm:Label>
        <tcm:Label ElementName="Percentage" Metadata="false">Resize percentage</tcm:Label>
        <tcm:Label ElementName="ItemName" Metadata="false">Resize only item named</tcm:Label>
      </tcm:Labels>
    </xsd:appinfo>
  </xsd:annotation>
  <xsd:element name="Parameters">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Width" minOccurs="0" maxOccurs="1" type="xsd:decimal">
          <xsd:annotation>
            <xsd:appinfo>
              <tcm:CustomURL xmlns:tcm="http://www.tridion.com/ContentManager/5.0">/TemplateBuilder/TemplateParameterDescriptions/ImageResizer.html#Width</tcm:CustomURL>
              <tcm:ExtensionXml xmlns:tcm="http://www.tridion.com/ContentManager/5.0"></tcm:ExtensionXml>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Height" minOccurs="0" maxOccurs="1" type="xsd:decimal">
          <xsd:annotation>
            <xsd:appinfo>
              <tcm:CustomURL xmlns:tcm="http://www.tridion.com/ContentManager/5.0">/TemplateBuilder/TemplateParameterDescriptions/ImageResizer.html#Height</tcm:CustomURL>
              <tcm:ExtensionXml xmlns:tcm="http://www.tridion.com/ContentManager/5.0"></tcm:ExtensionXml>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="Percentage" minOccurs="0" maxOccurs="1" type="xsd:decimal">
          <xsd:annotation>
            <xsd:appinfo>
              <tcm:CustomURL xmlns:tcm="http://www.tridion.com/ContentManager/5.0">/TemplateBuilder/TemplateParameterDescriptions/ImageResizer.html#Percentage</tcm:CustomURL>
              <tcm:ExtensionXml xmlns:tcm="http://www.tridion.com/ContentManager/5.0"></tcm:ExtensionXml>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
        <xsd:element name="ItemName" minOccurs="0" maxOccurs="1" type="xsd:normalizedString">
          <xsd:annotation>
            <xsd:appinfo>
              <tcm:CustomURL xmlns:tcm="http://www.tridion.com/ContentManager/5.0">/TemplateBuilder/TemplateParameterDescriptions/ImageResizer.html#ItemName</tcm:CustomURL>
              <tcm:ExtensionXml xmlns:tcm="http://www.tridion.com/ContentManager/5.0"></tcm:ExtensionXml>
            </xsd:appinfo>
          </xsd:annotation>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>
Bart Koopman
  • 29.6k
  • 3
  • 40
  • 90