Added the debugging mode for images