changed the method of fetching images in Picture class
using file_or_url_context to get context and calling imread
and imghdr on returned context