Image transform that only crops if image is larger than set dimensions
You can easily do this in twig with a conditional that checks if the width of the image is larger than your target transforms width. Try something like this:

{% if image.getWidth()&gt;600 %}
  &lt;img src="{{ image.getUrl({ width: 600 }) }}"&gt;
{% else %}
  &lt;img src="{{ image.getUrl() }}"&gt;
{% endif %}