I can read jpg file using cv2 as
import cv2
import numpy as np
import urllib
url = r'http://www.mywebsite.com/abc.jpg'
req = urllib.request.urlopen(url)
arr = np.asarray(bytearray(req.read()), dtype=np.uint8)
img = cv2.imdecode(arr,-1)
cv2.imshow('abc',img)
However, when I do it with gif file, it returns an error:
error: (-215) size.width>0 && size.height>0 in function cv::imshow
How to solve this problem?