You should use plone.app.imaging for this.
It would be like:
<img tal:define="scales context/@@images;
thumbnail python: scales.scale('image', width=64, height=64);"
tal:condition="thumbnail"
tal:attributes="src thumbnail/url;
width thumbnail/width;
height thumbnail/height" />
Where context is the object which holds the image and image (on scales.scale('image'...) is the field name that has the image you want to resize.
If you want to use the predefined image sizes just use:
<img tal:define="scale context/@@images"
tal:replace="structure python: scale.scale('image',
scale='mini').tag()" />
Cheers