How can I decrease the size of textures in my blend file programmatically?

I'm new to blender.

I have a big .blend file and I need to decrease the size of the textures. How can I do it programmatically?

• Mar 21 '17 at 10:04

import bpy