Fixed gtermapi to handle images better