How to set different dimension in go.Picture?

How can i set the different dimension for each images in the node template ?

                      $(go.Picture, { 
								desiredSize: new go.Size(34, 34),
								
							},
							new go.Binding("source", "iconName", function (v) {
								return '../' + v + '.svg';
							})
						),

change dynamically based on array [desiredSize: new go.Size(each size, each size)) .Can you please suggest how to achieve this?

You could add a Binding on the “desiredSize”.

$(go.Picture, . . .,
  new go.Binding("desiredSize", "iconName",
        function(name) { return IconSizes[name]; }) )

Where you have already set up the IconSizes variable mapping icon names to Sizes.

Thank you Walter, So how can i hard code the size, i mean return type must me in array

                           me.goObj(go.Picture, {
								desiredSize: new go.Size(34, 34),
								//name: 'BODY'
							},
							new go.Binding("desiredSize","iconName",function(){

								return go.Size(45, 45)
							}),
							new go.Binding("source", "iconName", function (v) {
								return 'Light/' + v + '.svg';
							})
						)