Making image loading plugin to handle single or multiple image selections