How to set a different URL format for each entry type of a section?
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 %}