More specifically, the DDG parser starts reading a bang the moment is sees a '!'. Any token up until EOL or ' ' are included in the bang. As such, if you input a string like "cheese shop!i new york", DDG sends you to the image search with the query "cheese shop new york".
This also means that you can "prepend" anything with a bang, since that would include it in the bang (I guess this is obvious).