Loading image both from template and gallery.