How to set a different URL format for each entry type of a section? Is there any way to set a different url format for each entry type of a section?

I have an entry type "image" on which I will be using the Randomm plugin by Fred Carlsen to generate random strings for the URLs. Something like mysite.com/image/324739483. So I have to set the URL format to image/{customFieldHandle}.

But I also have an entry type "articles" and I'd like to add the actual article name in the URL, like mysite.com/articles/some-article-name.
You can set the URL format to something like this and it should work:

{% if object.type == "image" %}image/{customFieldHandle}{% elseif object.type == "articles" %}articles/{slug}{% endif %}