updated the way of loading images

Signed-off-by: Marcin Wiatr <mail.wichura@gmail.com>