3

I have a Compound Template which has a DWT that print the content of a component, then the TBB from Tridion 2009 Image Resizer and finally the TBB Default Finish Actions.

My problem is that the images are being created in the server with a size of 100x?? and I need a bigger one. In other environment I have the same structure and the images are resizing to 231x166 that is the size that I need.

The TBB Image Resizer hasn't got any parameter in any of the enviromnents and Default finish action also hasn't got parameters.

Does anyone knows where can I set the default size for Tridion Image Resizer TBB?

Thanks.

1 Answer 1

4

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.

As you can see in the description of the width and height fields, these default to 100px. So I do think you missed the set parameters on the other environment, or the TBB has been modified there.

If you are missing the Image Resizer Parameters Schema, you should be able to create it based on the following source. Make sure you attach that to your TBB and restart the Template Builder afterwards, so you can specify the size you need in on the TBB:

<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>
3
  • Yes I have the TBB with the Parameters Schema Width, height, percentage and itemName, but my problem is that the same TBB (Image resizer) is given different sizes in different servers and in both server, the TBB Image Resizer has not any parameter seted. In one server the images are 100x?? and in other one are 236x???
    – ITB
    Commented Sep 12, 2013 at 10:34
  • So neither template has 236 set in a parameter schema for the Image Resizer TBB? Is the image sized at 236 the original size? I'm not sure how Image Resizer would default to something other than 100 unless it's explicitly set. Do you have a template checked out in one of the environments and is there any other code adjusting image sizes? Commented Sep 12, 2013 at 20:21
  • The Parameters Schema is set on the TBB and the Parameter Values are set in the Component Template where you are using the TBB. If you say there are no parameters set, then it would be strange if the size is anything other than 100 (unless the TBB has been modified). But regardless of that fact, you can just set the values in your Component template (using the Template Builder). Commented Sep 13, 2013 at 8:38

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.