Optimize Image class