Auto save images along with .blend Blender has a very irritating quirk in which it fails to save an image that you have painted on, when the .blend is saved. To fix this you have to remember to use "save as image", before you save the .blend. Is there anyway to automatically save the image when saving the .blend?

P.S.

A script free solution(or a script that runs whenever I save, no matter which button/keyboard short cut.)would be of great value!
This sample code will save external images before saving to .blend (overwrites the originals):

bl_info = {
    "name": "Auto-save external images",
    "author": "CoDEmanX",
    "version": (1, 0),
    "blender": (2, 67, 0),
    "location": "",
    "description": "Save image datablocks on saving .blend",
    "warning": "Works on external images only!",
    "wiki_url": "",
    "category": "System"}


import bpy

def save_external_images(dummy):
    for img in bpy.data.images:
        img.save()


def register():
    bpy.app.handlers.save_pre.append(save_external_images)


def unregister():
    bpy.app.handlers.save_pre.remove(save_external_images)


if __name__ == "__main__":
    register()


Make sure you enable this addon by default!

It does not work on internal image datablocks, unless you extent above code to save to an external file or maybe pack internally.