img.py: fixed bug when giphy is unavailable