How would I omit zero value decimals in a number format? Say I have {{ item.width }} and {{ item.height }} which are number fields with 2 decimal places.
In my template I have this:
&lt;p&gt;Dimensions: {{ item.width }} x {{ item.height }} in.&lt;/p&gt;

Which will output like this:

Dimensions: 8.50 x 11.00 in.
Dimensions: 5.00 x 7.00 in.
Dimensions: 4.25 x 6.50 in.

How would I drop the decimal places that are not used?  Like this:

Dimensions: 8.5 x 11 in.
Dimensions: 5  x 7 in.
Dimensions: 4.25 x 6.5 in.
This can be done with Twig's trim filter. It works just like PHP's trim function.

{{ item.width|trim('0','right')|trim('.','right') }}