added gif support to image.js