Removed all image operations out of callbacks